Can someone please check the attached code and tell me what else needs to be added to create a new appointment in someone else's Outlook Calendar ? I dont seem to be able to get the part(.subject, .start etc) to work as it always complains its not part of the collection..
Thanks
Set olMAPI = GetObject("", "Outlook.Application"
.GetNamespace("MAPI"
Set myRecipient = olMAPI.CreateRecipient("Test User"
myRecipient.Resolve
If myRecipient.Resolved Then
Set schedmar = olMAPI.GetSharedDefaultFolder(myRecipient, olFolderCalendar)
' With schedmar
' .Subject = "Test application"
' .Start = DateSerial(2003, 7, 12) + TimeSerial(9, 30, 0)
' .End = DateSerial(2003, 7, 12) + TimeSerial(9, 45, 0)
' .ReminderPlaySound = True
' .Save
' End With
'
Else
MsgBox "Name not resolved"
End If
End Sub
Thanks
Set olMAPI = GetObject("", "Outlook.Application"
Set myRecipient = olMAPI.CreateRecipient("Test User"
myRecipient.Resolve
If myRecipient.Resolved Then
Set schedmar = olMAPI.GetSharedDefaultFolder(myRecipient, olFolderCalendar)
' With schedmar
' .Subject = "Test application"
' .Start = DateSerial(2003, 7, 12) + TimeSerial(9, 30, 0)
' .End = DateSerial(2003, 7, 12) + TimeSerial(9, 45, 0)
' .ReminderPlaySound = True
' .Save
' End With
'
Else
MsgBox "Name not resolved"
End If
End Sub