Scripting Open other users folder in Outlook 2003

Hello everybody!

I found myself quite a problem.

I am trying to write a startup script, that opens a calendar in outlook.

It's simple outlook.exe /select outlook:calendar

Now I'm trying to open other users calendar also from command line and I can't find any solutions.

Please help or advise....

Thank you!
Who is Participating?
David LeeCommented:

I took you literally when you said "script".  The code in the snippet below will launch Outlook and open a shared calendar.  This version assumes that by "shared" you mean a calendar a user has shared, no a public folder calendar, and that the calendar in question is the default calendar.  If both those conditions are true, then this code will work for you.  Follow these instructions to use it.

1.  Open Notepad.
2.  Copy the code into Notepad.
3.  Edit the code.  I included comments where things need to change.
3.  Save the file with a .vbs extension.
4.  Double-click the file to see it in action.
Const olFolderCalendar = 9
Dim olkApp, olkSes, olkRcp, olkCal
Set olkApp = CreateObject("Outlook.Application")
Set olkSes = olkApp.GetNamespace("MAPI")
'Change the profile name on the next line as needed'
olkSes.Logon "Outlook"
'Change the address of the owner of the shared calendar on the next line'
Set olkRcp = olkSes.CreateRecipient("")
Set olkCal = olkSes.GetSharedDefaultFolder(olkRcp, olFolderCalendar)

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.