Finding the Birthdate of an contact

  • Thread starter Thread starter Stephan Bock
  • Start date Start date
S

Stephan Bock

Hi everyone.

if a contact has a birthday, outlook adds the birthday on creation to the
appointments.
But in some cases i want to edit this appointment (for example "remind me 2
days before the birthday")

I pick a contact with these lines:
Set myNamespace = GetNamespace("MAPI")
Set myFolder = myNamespace.PickFolder ' only in this example .. in my
program i would use getfolderfromid
Set myItems = myFolder.Items
Set myContact = myItems.Find("[Account]=KAP000000001000000001")

and now the question:
is it posible to find this appointment? the contact and the appointment
should be connected by an unique ID (Not Name), or am i wrong?
And is it possible to find the appointmend direct .. without a loop thru all
appointments? (because the picking of the calendarFolder will cause outlook
to bring up a warning .. not nice)


a "big thanks" is lying on my table for everyone who brings me nearer to the
solution :)
 
Your Find string is incorrect. It needs quotation marks around the account:

strFind = "[Account]=" & Chr(34) & "KAP000000001000000001" & Chr(34)
Set myContact = myItems.Find(strFind)

However, there's nothing in the contact to help you open the appointment
directly. Instead, search your calendar folder for an appointment with Full
Name's Birthday as the subject.
 
Back
Top