Getting "Other calendars" list

  • Thread starter Thread starter Sven Nabuurs
  • Start date Start date
S

Sven Nabuurs

Hello,

Is it possible to get a list of names of the calendars which are opened
previously by the user and are displayed as a check-box list under the "Other
calendars" list?
Does the outlook object model expose this list?
We are aware of the Outlook.xml file containing the opened shared calendars
but the user can add shared calendars which are only stored when outlook is
closed.

We need to capture the OnChangeItem event of a calendar of shared calendar.
For this we need the calendar folder so we can register our event-handler.
The folder can be obtained with the GetSharedFolder method.
For this we need the name of the person whose calendar is shared.

Kind regards,
Sven Nabuurs
 
We are developing an Outlook Add-In for Outlook 2000 - 2007.

In Outlook 2000 there is no such list but the user can switch between
calendars by opening a shared calendar. We need to know which calendar is
open in Outlook 2000.
 
For Outlook 2000, 2002 and 2003 you'd have to do something like getting the
current folder from ActiveExplorer().CurrentFolder. You can then get the
StoreID of that folder and use that to identify the calendar. The StoreID,
if you look at it as text in a tool such as OutlookSpy actually has the name
of the mailbox of the shared calendar as an Exchange DN. That's in addition
to the usual hack of reading and parsing the Navigation Pane XML.

For Outlook 2007 you can use those methods, iterate the Stores collection
and also get a NavigationModule. You have to dig down from NavigationPane,
Modules, NavigationModule, NavigationGroups and NavigationFolders to iterate
each NavigationFolder. Then you can get the store owner using PR_USER_NAME
(0x661A001E) from the PropertyAccessor of the Store object.

If you are using something like MAPI or CDO or Redemption you can get the
store owner by using PR_USER_NAME on a Store object to get the owner even in
earlier versions of Outlook.
 
Back
Top