A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to detect that an AppointmentItem is a birthday?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 4th 08, 01:26 AM posted to microsoft.public.outlook.program_vba
Lincoln Ramsay
external usenet poster
 
Posts: 2
Default How to detect that an AppointmentItem is a birthday?

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


Ads
  #2  
Old July 4th 08, 02:36 AM posted to microsoft.public.outlook.program_vba
Lincoln Ramsay
external usenet poster
 
Posts: 2
Default How to detect that an AppointmentItem is a birthday?

"Lincoln Ramsay" wrote in message
...
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


  #3  
Old July 4th 08, 08:12 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to detect that an AppointmentItem is a birthday?

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" wrote in message
...
"Lincoln Ramsay" wrote in message
...
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




  #4  
Old July 4th 08, 02:40 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How to detect that an AppointmentItem is a birthday?

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



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AppointmentItem Fil Outlook and VBA 4 June 13th 08 02:01 PM
ICS for inserting AppointmentItem Anup Outlook - Calandaring 0 March 6th 08 09:36 PM
Getting Weekday in AppointmentItem DENNIS BROWN Outlook and VBA 1 June 21st 07 08:10 PM
How to detect a user-deleted AppointmentItem? OctopusThu Add-ins for Outlook 6 December 21st 06 02:20 PM
How to modify an AppointmentItem? OctopusThu Add-ins for Outlook 6 December 14th 06 06:13 AM


All times are GMT +1. The time now is 05:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.