opening other user's folder using vba

  • Thread starter Thread starter Raul Ojasaar
  • Start date Start date
R

Raul Ojasaar

hi

how I can open other users calendar using vba
it's possible in outlook file - open other user's folder
all calendars have permission for reading for all users
following code not working

Set ol = CreateObject ("Outlook.Application")
Set ns = ol.GetNameSpace ("MAPI")
Set MyCalendar = ns.GetSharedDefaultFolder ("username", 9)

thnx

raul
 
When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. You'd see that GetSharedDefaultFolder takes a Recipient argument, not a string. You can create the recipient by creating a new mail message adding a recipient, then resolving that recipient.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top