Issue with Global Object ID

G

Guest

Refer the article at http://support.microsoft.com/?id=899919

An excerpt from the article is pasted below
"
Specifics about the Outlook object library
The Outlook object library provides the new functionality, starting with
Office Outlook 2003 SP2. This change will also be included in future versions
of Outlook.
"
I am not able to find this GlobalObjectID or any similar names in the
Outlook Object Model with SP2.

Little background of the application and configuration:
I am writing an application that uses .Net Framework 1.1 with C# language
that talks to Outlook 2003 with and without SP2.

Problem:
(1) I am not able to get the Global Object ID from Outlook. I am putting the
Outlook DLL from COM tab in references in Visual Studio 2003.
(2) Is there a way to access CDO 1.21 objects using C#?
(3) With Redemption (For those who know about this 3rd party dll), I have
issue in getting the Global Object ID. The code snippet is pasted below.

int propertyID =
safeAppointmentItem.GetIDsFromNames("{6ED8DA90-450B-101B-98DA-00AA003F1305}",
0x03);

// This line is failing and the id object returned is null <undefined>.
object id = safeAppointmentItem.get_Fields(propertyID);

Kindly help with answers for the above questions.

Thanks in advance.
SS
 
S

Sue Mosher [MVP-Outlook]

I am not able to find this GlobalObjectID or any similar names in the
Outlook Object Model with SP2.

The article is quite clear on this: "The Outlook object library has not been updated to expose this property."

You must access the property as a MAPI property, which means through Extended MAPI, CDO, Redemption (http://www.dimastr.com/redemption/) or MAPI33 (http://www.mapi33.freeservers.com/index.html). Only the latter two are supported in .NET languages.
// This line is failing and the id object returned is null <undefined>.
object id = safeAppointmentItem.get_Fields(propertyID);

The property may not be present on items created in versions earlier than Outlook 2003 SP2, in which case you need to handle the null return value. From the same article:

"In Microsoft Office Outlook 2003 Service Pack 1 (SP1) and earlier versions, the Global Object ID is generated when an organizer first sends a meeting request. Therefore, these earlier versions of Outlook do not generate a Global Object ID for unsent meetings or for appointments that have no recipients. In Outlook 2003 SP2, the Global Object ID is generated when a user first saves a calendar item, regardless of whether it is sent. Therefore, starting with Outlook 2003 SP2, all appointments will have a Global Object ID, regardless of whether they are meetings to which others have been invited."

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
K

Ken Slovak - [MVP - Outlook]

PMFJI, but the setting of the property tag for global object id is not
correct for use with Redemption.

int propertyID =
safeAppointmentItem.GetIDsFromNames("{6ED8DA90-450B-101B-98DA-00AA003F1305}", 0x03);You need to always use the PT type of the property when you useGetIDsFromNames. In this case the property is PT_BINARY so the formula forthat method should be Or'd with 0x102.--Ken Slovak[MVP - Outlook]http://www.slovaktech.comAuthor: Absolute Beginner's Guide to Microsoft Office Outlook 2003Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm"Sue Mosher [MVP-Outlook]" <[email protected]> wrote in messagenews:%23xj%23Q%[email protected]...> I am not able to find this GlobalObjectID or any similar names in the> Outlook Object Model with SP2.The article is quite clear on this: "The Outlook object library has not beenupdated to expose this property."You must access the property as a MAPI property, which means throughExtended MAPI, CDO, Redemption (http://www.dimastr.com/redemption/) orMAPI33 (http://www.mapi33.freeservers.com/index.html). Only the latter twoare supported in .NET languages.> // This line is failing and the id object returned is null <undefined>.> object id = safeAppointmentItem.get_Fields(propertyID);The property may not be present on items created in versions earlier thanOutlook 2003 SP2, in which case you need to handle the null return value.From the same article:"In Microsoft Office Outlook 2003 Service Pack 1 (SP1) and earlier versions,the Global Object ID is generated when an organizer first sends a meetingrequest. Therefore, these earlier versions of Outlook do not generate aGlobal Object ID for unsent meetings or for appointments that have norecipients. In Outlook 2003 SP2, the Global Object ID is generated when auser first saves a calendar item, regardless of whether it is sent.Therefore, starting with Outlook 2003 SP2, all appointments will have aGlobal Object ID, regardless of whether they are meetings to which othershave been invited."--Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx"SS" <[email protected]> wrote in messageRefer the article at http://support.microsoft.com/?id=899919>> An excerpt from the article is pasted below> "> Specifics about the Outlook object library> The Outlook object library provides the new functionality, starting with> Office Outlook 2003 SP2. This change will also be included in futureversions> of Outlook.> "> Little background of the application and configuration:> I am writing an application that uses .Net Framework 1.1 with C# language> that talks to Outlook 2003 with and without SP2.>> Problem:> (1) I am not able to get the Global Object ID from Outlook. I am puttingthe> Outlook DLL from COM tab in references in Visual Studio 2003.> (2) Is there a way to access CDO 1.21 objects using C#?> (3) With Redemption (For those who know about this 3rd party dll), I have> issue in getting the Global Object ID. The code snippet is pasted below.>> int propertyID =>safeAppointmentItem.GetIDsFromNames("{6ED8DA90-450B-101B-98DA-00AA003F1305}",> 0x03);>> // This line is failing and the id object returned is null <undefined>.> object id = safeAppointmentItem.get_Fields(propertyID);>> Kindly help with answers for the above questions.>> Thanks in advance.> SS>
 

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