How to get shared calendar's owner info

A

Adi

Hi,

I have created an Outlook 2003 addin using VSTO 2005 SE.

I need to get shared calendar's owner info. Suppose I have opened a
shared calendar of UserA in Outlook. Now I create a calendar item into
the shared calendar manually. I need to run a logic based on UserA's
display name/email address.

How do we get UserA details programmatically?

Thanks,
Aditya
 
K

Ken Slovak - [MVP - Outlook]

Where would this shared calendar folder be located, in another Exchange
mailbox or a PST file or what?

There really isn't any information that's readily available in cases like
this, the Exchange properties for store owner and mailbox name won't be
there unless the folder is opened as part of a mailbox opened as part of the
Outlook profile.

A hack would get the StoreID of the shared folder and massage that hex
string into an array of ASCII bytes. Part of that array would have the
Exchange distinguished name of the folder owner that can be decoded from the
array. From there you'd need to translate the Exchange DN into a recipient.

You can see the effect by looking at the StoreID property using a MAPI
viewer such as MFCMAPI from MS or OutlookSpy (www.dimastr.com) and see what
that looks like.
 
A

Adi

Thanks for the reply.
I don't think you can share a calendar on PST. In my case, shared
calendar is located in Mailbox of UserA.

I got the hack working but I was just wondering there must be a
simpler way to get the information like on whose calendar I am
creating the meeting. My scenario would be:
1. Open Outlook.
2. Open shared calendar of UserA (Suppose you have create and edit
permission on UserA's calendar).
3. Create a new meeting or modify an existing meeting.
4. Save the meeting.

At step 4, I need to find out that it is UserA's calendar and take
appropriate action. Is there a way to get this information using OOM
or MAPI?

Thanks,
Aditya
 
K

Ken Slovak - [MVP - Outlook]

In that case you can use the Organizer property on the item after it's
saved.
 
A

Adi

Organizer property will not work in case Attendee's calendar is
opened.

When we open a shared calendar, we provide user information which is
resolved internally and the calendar is opened.
I was just thinking if this information is stored at any place and can
be made use of?

Also when you say that StoreID contains folder's owner name, would it
always be in the exchange format i.e. /o=[Domain name]/ou=[]/
cn=Recipients/cn=[User Name]?

Thanks,
Aditya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top