Just a note on this: In Outlook 2007, delegate folders are cached if they're not opened through a secondary mailbox.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
You can use Extended MAPI (C++/Delphi only), CDO 1.21 or Redemption to read the PR_MAILBOX_OWNER_ENTRYID property from the folder if the folder if is not cached (it is not in case of a delegate folder). If it is cached, things get a bit more interesting...
<plug>
You can use RDOFolder.Store.Owner to figure out the owner in case of Redemption
skPrimaryExchangeMailbox = 3
skDelegateExchangeMailbox = 4
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set Folder = Session.GetFolderFromID(Application.ActiveExplorer.CurrentFolder.EntryID)
set Store = Folder.Store
if (Store.StoreKind = skPrimaryExchangeMailbox) or (Store.StoreKind = skDelegateExchangeMailbox) Then
MsgBox Store.Owner.Name
End If
</plug>
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
Yes, the name of the owner. On screen, it shows "Calendar - Dennis B.", but I don't know how to get that info with the om.
--
Thanks,
Dennis
The folder name will be "Calendar". Do you mean the owner's name?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
If I have 5 shared calendars open across the exchange server, how would I get the name of the folder that has focus at any given time?
If the 5 calendars were Michael P., Dennis B., Kevin S., Winston C., and Fred K., and I'm in Winston C.'s calendar, how would I retrieve that folder's name?