Global appointment id

J

jazeel

I want to read the GlobalAppointmentId of the Appointment item from the reply meeting request..
I can see this value when I open it in some other mail client (Outlook Express) as UID. How can I read this UID from a meeting request reply?
or is there is any other way to find the corresponding Appointment item? 'myMtgReq.GetAssociatedAppointment(True)' method will work only for appointments saved in default calendar. I am saving my appointment in some custom calendarfolder not in the default calendar folder

I am using VS2008, C# , vsto 3.0

or is there is any other way to link the meeting item to the parent appointment item saved in a custom calendar??? :(

Thanking you in advance
jaz
 
K

Ken Slovak - [MVP - Outlook]

And what version of Outlook are you using?

In Outlook 2007 you can just use the AppointmentItem.GlobalAppointmentID
property.

In earlier versions you'd need to use a lower level API to get at that
property. Since neither Extended MAPI nor CDO 1.21 are supported for managed
code you'd need to use an alternative such as Redemption
(www.dimastr.com/redemption). Then you could use the property tag
"http://schemas.microsoft.com/mapi/id/{6ED8DA90-450B-101B-98DA-00AA003F1305}/00030102"
in DASL syntax to get at that property.
 
D

Dave

Ken,

I am working on a similar project which needs to work with Outlook 2003 and
2007.
I save EntryID an GlobalAppointmentID in my database. In outlook 2007
everything works fine but not in Outlook 2003 using Interop .I could somehow
figure out reading GlobalAppointmentID using redemption but can not figure
out how to assign GlobalAppointmentID when creating a new Appointment message.
Here is my source code.Can you show me a practical sample or what I do wrong
here?
I appreciate that.

//////////////////////////code///////////////////
public void CreateMeetingUsingRedemption(string toEmail, string
subject, string location, string body, DateTime startDate, DateTime endDate,
bool allDay, bool requestResponses)
{
Outlook.Application objOL = new Outlook.Application();
rdmObjAppt =
(Outlook.AppointmentItem)objOL.CreateItem(Outlook.OlItemType.olAppointmentItem);
Redemption.RDOStore rdmStore;
Redemption.RDOFolder rdmFolder;
Redemption.RDOItems colItems;
Redemption.RDOMail rdmMail;
Redemption.RDOAppointmentItem rdmApp;
Redemption.RDOSession rdmSession;
Redemption.MAPIUtils rdmUtils;
Redemption.MAPITable rdmTable;
Redemption.TableFilter rdmFilter;
Redemption.RestrictionContent rdmRestr;
rdmSession = new Redemption.RDOSession();
rdmSession.MAPIOBJECT = rdmObjAppt.Session.MAPIOBJECT;
rdmFolder =
rdmSession.GetDefaultFolder(Redemption.rdoDefaultFolders.olFolderCalendar);
colItems = rdmFolder.Items;
rdmApp = new Redemption.RDOAppointmentItem();//should be
something wrong here?!
_globalAppointmentID = rdmApp.GlobalAppointmentID;
_entryID = rdmApp.EntryID;
rdmApp.Start = startDate;
rdmApp.End = endDate;
rdmApp.Subject = subject;
rdmApp.Location = location;
rdmApp.Body = body;
rdmApp.MeetingStatus = Redemption.rdoMeetingStatus.olMeeting;
rdmApp.RequiredAttendees = toEmail;
rdmApp.AllDayEvent = allDay;
rdmApp.ResponseRequested = requestResponses;
rdmApp.Save();
}
///////////////////////////////////////////////////
 
K

Ken Slovak - [MVP - Outlook]

RDOAppointmentItem doesn't support ICreatable, so you can't create a new
instance of that object using the "new" keyword.

You can create an Outlook.AppointmentItem, save it, then get the EntryID to
retrieve it using the RDOSession.GetMessageFromID() method. That way the
global object id will have been created already for you.

An alternative would be to get the RDOFolder where you want the item to be
located, get the RDOItems collection for that folder and then use the
RDOItems.Add() method to create the new item. It would be created as
RDOMail, which you'd then cast to an RDOAppointmentItem object.
 

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