Hi Kevin,
The following code should help you on your way. It allows you to access another users Outlook Calendar. To access the Calendar you must have delegated access to their Calendar.
cOtherUser = "Bart Simpson"
loOutLook = CREATEOBJECT("Outlook.Application")
loNameSpace = loOutLook.GetNameSpace("MAPI")
loOtherUser = loNameSpace.CreateRecipient(cOtherUser)
loOtherUser.Resolve()
IF loOtherUser.Resolved = .T.
cOnError = ON("ERROR")
ON ERROR *
loCalendar = loNameSpace.GetSharedDefaultFolder(loOtherUser,9)
ON ERROR &cOnError
IF TYPE("loCalendar") = "O"
nItemCount = loCalendar.Items.Count
FOR nLoop = 1 TO nItemCount
WITH loCalendar.Items[nLoop]
cSubject = .Subject
tCreationTime = .CreationTime
cLocation = .location
tStart = .start
nDuration = .duration
tEnd = .end
ENDWITH
ENDFOR
ELSE
MESSAGEBOX("You don't have delegated access to the calendar of " + cOtherUser + "." ;
, 16 ;
, "Couldn't Access Calendar")
ENDIF
ELSE
MESSAGEBOX(cOtherUser + " couldn't be resolved agains the AddressBook." ;
, 16 ;
, "Couldn't Resolve User")
ENDIF
Hope this helps,
Gavin...
>Hi
>
>Is there a way of opening other people's calendars from the Outlook API?
>
>Thanks
>Kev