Shared Calendar Owner's Name

  • Thread starter Thread starter Paparazzo
  • Start date Start date
P

Paparazzo

Is there any way of extracting a user (owner) name from a displayed
appointment item from a shared calendar?

What I am trying to do is as follows:

Double click on a visible shared Calendar (e.g. that of “Wilson, Dan
(Accounts)â€

This gives an Explorer item (“Untitled - Eventâ€).

I use the NewExplorer event to display a toolbar which has a button to
insert the necessary data in the appointment item, and then save it.

A Word document is then created for issue to the client, but I need to
insert the person’s name (i.e. the "owner" of the Calendar, in this case Dan
Wilson) into the letter, but I can’t figure out how to actually get the name.
 
What version of Outlook?

If the store is a PST file then the owner is always whoever has it open at
that time. For an Exchange mailbox you need to get the Store property and
look at property PR_USER_NAME (0x661A001E), a PT_STRING8 value.

If this is Outlook 2007 you can use the new Store object and the
PropertyAccessor to read that property value. The DASL syntax for that
property would be "http://schemas.microsoft.com/mapi/proptag/0x661A001E".

You can also use the PR_MAILBOX_OWNER_NAME property (0x661C001E), another
PT_STRING8 property, the DASL for that is
"http://schemas.microsoft.com/mapi/proptag/0x661C001E".

If you are using an older version of Outlook you'd have to use a different
API such as CDO 1.21 (not supported for managed code) or Extended MAPI (C++
or Delphi only, not supported for managed code) or a 3rd party library such
as Redemption (www.dimastr.com/redemption).
 
Ken

I'm using Outlook 2003 and due to network restrictions any possible solution
has to be done using VBA only.
 
Then your options are CDO 1.21 or a 3rd party library, as mentioned before.
 
Ken, do you know if PR_MAILBOX_OWNER_NAME works for both types of shared folders -- a) those opened through a secondary mailbox set up in the profile settings and b) those opened with File | Open | Other User's Folder or shared with Outlook 2007 sharing items? Thanks!

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


Ken Slovak - said:
What version of Outlook?

If the store is a PST file then the owner is always whoever has it open at
that time. For an Exchange mailbox you need to get the Store property and
look at property PR_USER_NAME (0x661A001E), a PT_STRING8 value.

If this is Outlook 2007 you can use the new Store object and the
PropertyAccessor to read that property value. The DASL syntax for that
property would be "http://schemas.microsoft.com/mapi/proptag/0x661A001E".

You can also use the PR_MAILBOX_OWNER_NAME property (0x661C001E), another
PT_STRING8 property, the DASL for that is
"http://schemas.microsoft.com/mapi/proptag/0x661C001E".

If you are using an older version of Outlook you'd have to use a different
API such as CDO 1.21 (not supported for managed code) or Extended MAPI (C++
or Delphi only, not supported for managed code) or a 3rd party library such
as Redemption (www.dimastr.com/redemption).

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


Paparazzo said:
Is there any way of extracting a user (owner) name from a displayed
appointment item from a shared calendar?

What I am trying to do is as follows:

Double click on a visible shared Calendar (e.g. that of “Wilson, Dan
(Accounts)â€

This gives an Explorer item (“Untitled - Eventâ€).

I use the NewExplorer event to display a toolbar which has a button to
insert the necessary data in the appointment item, and then save it.

A Word document is then created for issue to the client, but I need to
insert the person’s name (i.e. the "owner" of the Calendar, in this case
Dan
Wilson) into the letter, but I can’t figure out how to actually get the
name.
 
Sue,

I didn't try with the OL12 sharing items but using File, Open, Other etc.
didn't show either property in OutlookSpy. In my experience opening a folder
that way doesn't provide many of the properties you need for various things.




Ken, do you know if PR_MAILBOX_OWNER_NAME works for both types of shared
folders -- a) those opened through a secondary mailbox set up in the profile
settings and b) those opened with File | Open | Other User's Folder or
shared with Outlook 2007 sharing items? Thanks!
 
Back
Top