tags:

views:

921

answers:

3

Hello I would like to access the contacts field on an email message (Email options) in outlook. Normally this field ties an email to a contact. Since it is a freeform text field available from the options dialog box, I am trying to use it to store a "next action" for my email message. I would like to set the next action based on the subject but I can't figure out how to access thas field from the outlook.mailitem object

Thanks Jim

A: 

Hmm, I also couldn't figure out how to access the Contacts field but from your description it sounds like you're not intending to use it for its intended purpose at all but rather just have the need to associate some arbitrary string data with an email item. If that is correct, I would recommend adding fields to the UserProperties collection instead.

Oliver Giesen
+1  A: 
Geoff
A: 

There are easier way to get Contacts list - by using Links property of oMailItem object:

    For i = 1 To mailItem.Links.Count
  If mailItem.Links.item(i).Type = olContact Then
    Debug.Print mailItem.Links.item(i).Name
  End If
Next i