How to Add an Appointment to a Shared Calendar in Outlook?
<p>I am attempting to create an appointment taken from a <code>.CSV</code> file with Subject and Date and place this in someone else's shared calendar.</p>

<p>I have full editor's permissions for this shared calendar. By shared calendar I mean, a regular calendar made in the person's Outlook and clicking "Share" and emailing it to others.</p>

<pre><code>Sub ImportAppointments(full_path As String)

'Initialize variables
Dim exlApp As Excel.Application
Dim exlWkb As Workbook
Dim exlSht As Worksheet
Dim rng As Range
Dim itmAppt As Outlook.AppointmentItem

' Create reference to Excel
Set exlApp = New Excel.Application

' Select file path, currently hardcoded to one directory, change as needed
Dim strFilepath As String
'strFilepath = "P:\Holiday Calendar\Holiday_Calendar_Data.csv"
strFilepath = full_path

' Select workbook (the above .csv file) and select the first worksheet as the data sheet
Set exlSht = Excel.Application.Workbooks.Open(strFilepath).Worksheets(1)

' Initialize variables
Dim iRow As Integer
Dim iCol As Integer
Dim oNs As Namespace
Dim olFldr As Outlook.MAPIFolder
Dim objOwner As Outlook.Recipient

' Allow accessing data stored in the user's mail stores in Outlook
Set oNs = Outlook.GetNamespace("MAPI")

' Set share calender owner
Set objOwner = oNs.CreateRecipient("calvin@xyz.ca")
    objOwner.Resolve

If objOwner.Resolved Then

    ' Set up non-default share folder location
    Set olFldr = oNs.GetSharedDefaultFolder(objOwner, olFolderCalendar).Folders("Holiday Calendar")

End If

' Start point
iRow = 2
iCol = 1

' Loop through each calendar entry
While exlSht.Cells(iRow, 1) &lt;&gt; ""

    Set itmAppt = Outlook.CreateItem(olAppointmentItem)

    ' Set appointment Subject, ie (Vacation, Sick Day, Half-Day, etc.)
    itmAppt.Subject = exlSht.Cells(iRow, 1)

    ' Set Date of Event
    itmAppt.Start = exlSht.Cells(iRow, 2)

    ' Force All Day Event
    itmAppt.AllDayEvent = True

    ' Save appointment
    itmAppt.Save

    ' Advance pointer to next row
    iRow = iRow + 1

    ' Transfer appointment into shared calendar folder
    itmAppt.Move olFldr

Wend

' Close everything
Excel.Application.Workbooks.Close
exlApp.Quit
Set exlApp = Nothing
Set olFldr = Nothing
Set itmAppt = Nothing

End Sub
</code></pre>

<p>My code fails to find the "Holiday Calendar" if I try to insert at someone else's calendar with</p>

<pre><code>Set olFldr = oNs.GetSharedDefaultFolder(objOwner, olFolderCalendar).Folders("Holiday Calendar")
</code></pre>