(Msg. 1) Posted: Fri Jul 04, 2008 3:04 am
Post subject: How to detect that an AppointmentItem is a birthday? Add to elertz Archived from groups: microsoft>public>outlook>program_vba (more info?)
Hello,
I've got code (not VBA but using the object model) to synchronize
appointments and contacts from Outlook to an external source. There is a
problem though because Outlook shows contact birthdays as calendar events. I
would like to detect and suppress these calendar events because the remote
system also has this logic and it leads to multiple calendar events existing
for each birthday.
I've looked at the docs but I can't see how I might detect that an
AppointmentItem is a birthday. Can this be done?
(Msg. 2) Posted: Fri Jul 04, 2008 3:04 am
Post subject: Re: How to detect that an AppointmentItem is a birthday? Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
"Lincoln Ramsay" <a1291762.DeleteThis@yahoo.com> wrote in message
news:eTADryW3IHA.3544@TK2MSFTNGP06.phx.gbl...
> I've looked at the docs but I can't see how I might detect that an
> AppointmentItem is a birthday. Can this be done?
Ok... I think I found a way to get this from MAPI...
There is a named property (GUID {00062008-0000-0000-C000-000000000046}, ID
0x8586) that appears to be the Contact's name. This is present on birthday
and anniversary events but not on regular events.
Ugly, but no different to the code I already had to get contact email
addresses via MAPI (to avoid the security dialogs).
(Msg. 3) Posted: Fri Jul 04, 2008 3:04 am
Post subject: Re: How to detect that an AppointmentItem is a birthday? Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Itis called ContactLinkName (there are also ContactLinkSearchKey and
ContactLinkEntry properties: 0x8584 and 8585), but AFAIK it will be set only
in Outlook 2007.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Lincoln Ramsay" <a1291762 RemoveThis @yahoo.com> wrote in message
news:%239bX8ZX3IHA.4988@TK2MSFTNGP06.phx.gbl...
> "Lincoln Ramsay" <a1291762 RemoveThis @yahoo.com> wrote in message
> news:eTADryW3IHA.3544@TK2MSFTNGP06.phx.gbl...
>> I've looked at the docs but I can't see how I might detect that an
>> AppointmentItem is a birthday. Can this be done?
>
> Ok... I think I found a way to get this from MAPI...
>
> There is a named property (GUID {00062008-0000-0000-C000-000000000046}, ID
> 0x8586) that appears to be the Contact's name. This is present on birthday
> and anniversary events but not on regular events.
>
> Ugly, but no different to the code I already had to get contact email
> addresses via MAPI (to avoid the security dialogs).
>
> --
> Link
>
>
(Msg. 4) Posted: Fri Jul 04, 2008 6:40 am
Post subject: RE: How to detect that an AppointmentItem is a birthday? Add to elertz [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Such items will be all-day events with "Birthday" or "Anniversary" in the
Subject property. If you need more confirmation than that, you can extract
the person's name from the Subject, get their contact record and compare the
birthday value for the contact with the Start date for the appointment.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Lincoln Ramsay" wrote:
> Hello,
>
> I've got code (not VBA but using the object model) to synchronize
> appointments and contacts from Outlook to an external source. There is a
> problem though because Outlook shows contact birthdays as calendar events. I
> would like to detect and suppress these calendar events because the remote
> system also has this logic and it leads to multiple calendar events existing
> for each birthday.
>
> I've looked at the docs but I can't see how I might detect that an
> AppointmentItem is a birthday. Can this be done?
>
> --
> Link
>
>
>
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum