Finding the Birthdate of an contact

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 :)
 
S

Sue Mosher [MVP-Outlook]

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.
 

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