Scripting Open other users folder in Outlook 2003

Posted on 2009-02-12
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!
Question by:IEDC
    1 Comment
    LVL 76

    Accepted Solution

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

    Open in new window


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
    Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
    This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
    This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now