opening other user's folder using vba

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
 
S

Sue Mosher [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top