?
Solved

Scripting Open other users folder in Outlook 2003

Posted on 2009-02-12
1
Medium Priority
?
321 Views
Last Modified: 2013-11-05
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!
0
Comment
Question by:IEDC
1 Comment
 
LVL 76

Accepted Solution

by:
David Lee earned 750 total points
ID: 23620706
Hi, IEDC.

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("someone@company.com")
Set olkCal = olkSes.GetSharedDefaultFolder(olkRcp, olFolderCalendar)
olkCal.Display

Open in new window

0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question