Link between a contact and an appointment

J

Julien

Hello,

When a new appointment is created, I recieve an itemAdd
event.The parameter of this event is an appointmentItem.
it's possible to get the names of the persons concerned
by this appointment with the links property of the
appointementItem.
Now, I try to identify exactly the contacts of this
appointment.
When the person concerned by this appointment is in the
addressBook, this object : Item.Links.Item(i).Item is a
contactItem so I can get the entryID of the contact.
My problem is that when the person concerned isn't in the
addressBook, this object (still Item.Links.Item(i).Item)
doesn't exists..so I get an error.

Can anyone help me to know how to get the entryID when
the person concerned is in the addressBook.
In fact, if I had a function that returns true in the
case where Item.Links.Item(i).Item exists and false when
it doesn't exists, it will be perfect :
- True, the person is in the AddressBook I can get the
entryID
- False, it's not a contact I can't have more
informations than the name (Item.Links.Item(i))

Thanks,
Julien.
 
G

Guest

I've resolved my problem :
I've written this function

Private Function isRealContactItem(Thelink As Link) As
Boolean
On Error GoTo erreur
If TypeName(Thelink.Item) = "ContactItem" Then
isRealContactItem = True
Exit Function
End If

erreur:
isRealContactItem = False

End Function


And I call it in my itemAdd handler.
 

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