How to open a specific Calendar in Outlook

Hi,
I'm struggling to find an example on other forums, or not understanding the code.
I want to open a non-default calendar in Outlook to create an appointment (it's a hotmail account, which is shared with a couple of people, so that they can all see the same appointment in outlook).
The account is in the form of "[email protected]".  I've tried 3 different examples I've found on forums and none work.  Here's the code that works for the default calendar, so I'm after the code to open the specific calendar (the
variable passed as strCalendar).
Public Function fnCreateOutlookAppointment(strStartDate As String, Optional strEndDate As String, Optional strEventTitle As String, Optional strLocation As String, Optional strDetails As String, Optional intDuration As Integer, Optional strStartTime As String,
Optional strEmailList As String, Optional strStatus As String, Optional strAction As String, Optional blnAllDay As Boolean, Optional intReminderTime As Integer, Optional strCalendar As String)
    Dim olApp As New outlook.Application
    Dim olAppointment As AppointmentItem
    Dim myRequiredAttendee As outlook.Recipient
    Set olAppointment = olApp.CreateItem(olAppointmentItem)
    If Len(strStartTime) < 1 Then
        strStartTime = "09:00:00"
    End If
    If blnAllDay = Null Then
        blnAllDay = False
    End If
    If Len(strEndDate) < 1 Then
        strEndDate = strStartDate
    End If
    With olAppointment
        .Start = DateValue(strStartDate) + TimeValue(strStartTime)
        .Duration = intDuration
        .Subject = strEventTitle
        .Location = strLocation
        .Body = strDetails
        Select Case strStatus
            Case "Free"
                .BusyStatus = olFree
            Case Else
                .BusyStatus = olBusy
        End Select
        Select Case blnAllDay
            Case True
                .AllDayEvent = True
            Case Else
                .AllDayEvent = False
        End Select
        .ReminderMinutesBeforeStart = intReminderTime 
        .ReminderSet = True
        If Len(strEmailList) > 0 Then  'only add if email addresses supplied (and using ; as a break e.g. "[email protected];[email protected]"
            Set myRequiredAttendee = .Recipients.Add(strEmailList)
            myRequiredAttendee.Type = olRequired
        End If
        If strAction = "save" Then
            .Save
        Else
            .Display
        End If
    End With
    Set olAppointment = Nothing
    Set olApp = Nothing
End Function
_________________________________________________________ Every day is a school day!

Hi ChrisJC,
To get the specific calendar folder (non-default folder), please refer to this code below:
Dim oNS As Outlook.NameSpace
Dim MyItemsFolder As Outlook.MAPIFolder
Dim myAppoint As Outlook.AppointmentItem
Set oNS = oApp.GetNamespace("MAPI")
Set MyItemsFolder = oNS.Folders("[email protected]").Folders.Item("Calendar")
Then you could add appointment item by using
Items.Add method.
Set myAppoint = MyItemsFolder.Items.Add(olAppointmentItem)
Regards
Starain
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How can i sync my calendar in Outlook 2007 with iTunes 11.1.3.8 WITHOUT using iCloud?

    How can i sync my calendar in Outlook 2007 with iTunes 11.1.3.8 WITHOUT using iCloud?

    your link shows how to sync, i know how to do that.
    i specifically wanted to sync my outlook calendar with my phone, not my outlook calendar with icloud calendar.
    apparently you have to go into setup on phone and tell phone not to sync calendars with icloud so you can get choice to sync phone via itunes.
    thanks anyways for trying.
    feel free to reference my solution for similar questions.

  • How to open a specific file in projector.

    Hi to all
    can any body tells me that how to open a specific file in
    projector with an application not in browser????
    and also want to add a button to mute the sound just like in
    intros with fade in and out effect.
    its urgent....
    Thanks in advance

    Hi,
    You can use FlashJester JStart
    http://jstart.flashjester.com
    that will open up any file the has been associated in Window
    Explorer.
    Download a FREE evaluation copy and try it for yourself.
    Please look at the example files given.
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. -
    http://www.flashjester.com
    There is a very fine line between "hobby" and
    "mental illness."

  • How can I sync my calendar with outlook

    This question has a couple parts to it.<br><br>First, I am self employed and use Outlook as my primary calendar. With my BB7 device this syncing issue was easy but I find it so hard with my new Z30.<br><br>My email is a rogers.com email. I have 2 email accounts on my device (personal and business which are both rogers.com emails.<br><br>How can I sync my calendar with outlook and allow changes made in both outlook or the device appear updated on both outlook and my device?<br><br>When I make a calendar entry in my phone it prompts me to use either my groups, my work email, my personal email and then I see BLINK with the name of my office computer.<br><br>What should I be using as my default calendar? The one that says BBlink-Computer name or my business email address?<br><br>Secondly is there a way to sync all my calendar entries with outlook to avoid personal and business conflicts? That is my BBM group calendar entries, personal email calendar entries and my business calendar entries?<br><br>I'm really baffled by all this. I keep being told I need to set up an outlook.com email address. Do I really need to do this? I prefer not to.<br><br>Essentially, how can I make all my calendar entries show on my office outlook calendar so I can see everything to avoid scheduling conflicts and not need to check my device before booking an appointment in my desktop outlook?<br><br>Lastly I have my outlook set to show me Canadian Holidays. How can I get these to appear in my device calendar?<br><br>Please...<br>This has been baffling me since I for my device about a month ago. Any help would be greatly appreciated.<br><br>I have the latest link software on my PC and have the latest OS on my phone.<br><br>Thank you in advance to all that reply.<br><br>Regards,<br>Dan

    I think (and I'll double check) only the BBLink events will sync on a wired USB sync. I'm fairly certain of that.
    You'll need to use your calendar syncing via an EAS email account (outlook.com, for instance, is free) to sync wirelessly. It works great. I use it and was a former tied to the USB sync guy as well... and I thought I was gonna die a painful death without it. I found more freedom this way.
    This explains the process. But I don't think you'll get BBM Groups to sync.
    http://supportforums.blackberry.com/t5/BlackBerry-​Z10/How-To-OTA-Sync-BB10-and-non-BES-Outlook-Overv​...
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How can I get specific URLs from outlook to open in firefox where IE is my default browser

    I require to open specific URLs from outlook to be opened in Firefox. However, IE will be my default browser.

    Try this tutorial ;)
    http://support.mozilla.com/en-US/kb/Remembering+passwords

  • How to setup a specific calendar in iCal not to sync events from iphone S to other apple devices?

    In iCal, multiple calendars can be setup.  For example,  I have 3 different calendars in iCal.  I would like the events in calendar 1 and 2 to b synced with my Mac Pro, iPhone S and iPad. I do not want the events in calendar 3 to be synced from my iPhone S to the Mac Pro and iPad. How can this be set up?

    Hi ChrisJC,
    To get the specific calendar folder (non-default folder), please refer to this code below:
    Dim oNS As Outlook.NameSpace
    Dim MyItemsFolder As Outlook.MAPIFolder
    Dim myAppoint As Outlook.AppointmentItem
    Set oNS = oApp.GetNamespace("MAPI")
    Set MyItemsFolder = oNS.Folders("[email protected]").Folders.Item("Calendar")
    Then you could add appointment item by using
    Items.Add method.
    Set myAppoint = MyItemsFolder.Items.Add(olAppointmentItem)
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to open a specific excel file by activex & overwrite by set_cell_value.vi

    I've seen the 'Write Table and Chart to XL.llb', but how can i open an existing excel file/workbook/sheet and rewrite some of the data instead of open a new worksheet everytime? It may already shown in your examples somewhere, but since I'm new to activex/property node stuff, I can't figure it out. Your help is appretiated.
    Thanks
    Anthony

    The process is very similar. Starting with the example, open the diagram and you'll see a VI labled "Open Book" (The name of the VI is actually "Open New Workbook.vi". Right click on it and select Replace/Select a VI...
    Now navigate to \\Labview 7.0\examples\comm\excelexamples.llb and select the file "Open Specific Workbook.vi". This VI has an input for specifying a filename to open.
    Likewise, the example also calls a VI named "Open a New Worksheet.vi" replace that with "Open a Specific Worksheet.vi" (found in the same place).
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Imac is 4 months old.  Using installed Outlook for Mac 2011 but now want to use ical so that I can start to use iCloud to sync with my Ipad2 and iPhone.  How do I move my calendar from outlook to ical on the iMac?

    This is my first attempt at using this forum so please be patient with me.  I am new to the apple world.  Bought an Imac desktop computer back in October and installed Microsoft Office for Mac 2011 because I was used to Word, Excel, Powerpoint, and outlook.  Now I am being told that I should be using ical for my calendar so that I will be better able to move to icloud for use between my Imac, Ipad2, and Iphone.
    The question is:  how do I move my calendar which is in "Outlook for Mac 2011" into ical on my Mac?  Do I have to remove the Outlook entries from the computer and reinstall them back to the same machine or can I somehow move calendar entries within the machine?  I appreciate any help I can get.  Thanks.

    I also already deleted my phone number from iMessage on my MBP.

  • How to open the specific folder view with JS

    Hi,
    Maybe very simple thing, but I don´t know how to "open" the view to an excisting folder like "Macintosh HD/MyDocs/This_Folder" ?
    Thanks in advance!
    Erkki

    I found the answer myself. It was this what was missing (to choose the specific folder).
    eg.
    app.browseTo(Folder("/Macintosh HD/MyFolder/"));

  • How do I eliminate multiple calendars in outlook 2007

    I seem to have 7 different versions of the same calendar in Outlook 2007  that have different degrees of  completeness. Can someone explain how to simplify this mess into one calendar in icloud that syncs with my iPhone 4S?  All I want is one calendar shared in Outlook and the iphone. thanks.

    Annefrompa wrote:
    I seem to have 7 different versions of the same calendar in Outlook 2007  that have different degrees of  completeness. Can someone explain how to simplify this mess into one calendar in icloud that syncs with my iPhone 4S?  All I want is one calendar shared in Outlook and the iphone. thanks.
    Backup every calendar that is not in the iCloud account, then delete them.

  • Can't open someones others calendar with Outlook Connector

    Hi,
    I can't open someones others calendar from within Outlook Connector. Outlook 2003 complains: Your profile is not configured to .....
    What could be the reason and what's a possible solution ? I can open my calendar on the server, with the Calendar Client, I can open someones calendar, also with the Webclient.
    Regs
    Eric

    Strange - I just configured 3 users with shared calendars, all running Office 20043/Outlook. This works fine, and all are able to watch each others calendar when the set up a meeting.
    To be able to fully read another users calendar, I suppose the calendar owner must grant you rights to modify on behalf of the him?

  • How do I delete iCloud calendars from Outlook 2010?

    I installed the iCloud control panel on my Windows 7 PC.
    The results were not what I expected.
    I wish to remove the iCloud calendars from Outlook. The program is not allowing me to do this.
    I have already uninstalled the iCloud control panel from my PC.
    Any help would be appreciated.

    I had the same problems with iCloud and this thread helped me get rid of the duplicate calendars.  Thanks!  Things are mostly back to normal.  But even though my iCloud calendar appears to be gone, I'm now getting two reminders for every event.  Any idea how to get rid of the duplicate reminders? 
    More info: Using Win 7 and OL 2007. The only calendar selections available are my normal calendar and my archived calendar. The events that are sending out reminders don't appear in the archived calendar.  Under Other Calendars I still see a calendar group called "iCloud" but there's nothing under the title.  Nothing extra shows up in Data File Management.  I tried this suggestion but don't see any duplicated events:
    http://www.ehow.com/how_7340535_remove-duplicate-reminders-outlook-2007.html

  • How to Open a Specific Folder in the Finder via Shortcut Key

    I'm sure this has been covered elsewhere, so sorry for not finding it...
    Is it possible to assign a shortcut key to open a specific folder with Automator or AppleScript? There are 4-5 commonly used folders buried 10-11 levels deep on a server and I'd love to have a shortcut key to open those particular folders in the Finder.
    Could you give me some assistance?
    Thanks!

    QuickKeys may work, or you can look on http://www.versiontracker.com or http://www.macupdate.com for other alternatives.
    Another option is to create aliases to those folders and store the aliases in a local folder which you can place on your Dock, the Finder window sidebar or toolbar.

  • How do i sync icloud calendar with outlook on macbook air

    i have a new macbook air and my calendar is on iCloud for all my other devices. i would like to be able to see the calendar in outlook (office 365)

    Upgrade to Lion.  Snow Leopard doesn't have iCloud support.

  • How can I sync two calendars with Outlook?

    My iPhone is set to Spanish and so it uses a calendar automatically named "Calendario." All my data is on there.
    I would like to add the US holidays to my calendar.
    When I tried to do this on Outlook, it added the holidays to its own default calendar called "Calendar" (which is otherwise empty). Nothing was added to "Calendario." There was no obvious way to bypass "Calendar" in favor of "Calendario" when adding the holidays.
    So I have two calendars, one with all my data, the other with just the holidays. The two sets can merge (overlay) just fine on Outlook, but I can't figure out whether this is possible on the iPhone. It seems I can only set one default calendar on the device. It would be helpful to just be able to delete "Calendar" altogether, but Outlook doesn't let me do this.
    Is there a way to merge these two calendars so I can see them together on my iPhone, or to delete "Calendar" and just put all the holidays on "Calendario"? Thanks.

    I think (and I'll double check) only the BBLink events will sync on a wired USB sync. I'm fairly certain of that.
    You'll need to use your calendar syncing via an EAS email account (outlook.com, for instance, is free) to sync wirelessly. It works great. I use it and was a former tied to the USB sync guy as well... and I thought I was gonna die a painful death without it. I found more freedom this way.
    This explains the process. But I don't think you'll get BBM Groups to sync.
    http://supportforums.blackberry.com/t5/BlackBerry-​Z10/How-To-OTA-Sync-BB10-and-non-BES-Outlook-Overv​...
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

Maybe you are looking for

  • Vertical text alignment in iPhoto calendar is jacked

    I am creating a calendar in iPhoto '11 (9.4.2) and have added many events (birthdays, anniversaries, etc.) on individual dates. On several of these events I am unable to set the vertical alignment to the bottom of the box. I can edit the text for a c

  • Error while importing an existing project into workspace

    hi, I am trying to import an existing project into workspace but getting an error 'vfamilychange' doest not have a .project file .But while checking into the folder structure of project vfamilychange' shows the .project file is already there. Please

  • Why do we require Receiver IDoc Adapter wen Sender IDoc Adapter is not req?

    Hi All, We require Receiver IDoc Adapter( if the receiving System is R/3 and uses IDoc) but when sending BS uses IDoc, Sender IDoc Adapter is not required since it resides in ABAP  Stack. So, can anyone explain me as why do we need to configure Recei

  • How to make multiple pages from a PDF?

    I'm only able to bring out 1 page from a PDF file. How can I make it so that I can create multiple pages into a single PDF file?

  • Unable to send or receive messages for the Btinter...

    Hello I use Windows Live Mail to download my emails. This is working fine on two computers for other BT Internet and Gmail accounts. But one of my main BT accounts consistently receives the following messages on both computers: Unable to send or rece