Addressbook show nothing (cannot find any contact when composingmail)

  • Thread starter Thread starter Tagman
  • Start date Start date
T

Tagman

Hi,

I have followed what cdolive.com tips to add contacts to the outlook
using CDO 1.21. however, I found something strange:

1. The address book from outlook shows nothing.
when I try to compose a email from outlook, I click "To..." button,
there is no contact shown in the window. of course I have add my
contacts using CDO. Anyone know what steps I have missed?

2. In the contact window, most of the contact detail is ok. but the
email field has something wrong. After I have insert the email to this
contact A, the contact window show that email without underline.
After I change the display to email2 and then email1, the email1 show
underline. Will this affect the outlook find the email of the contact
when sending mail?

LetMAPIProperty(CdoMessage, CdoContact_EmailAddrType, "SMTP", vbString,
CdoPropSetID3)
LetMAPIProperty(CdoMessage, CdoContact_EmailOriginalDisplayName,
email.EmailAddress, vbString, CdoPropSetID3)
LetMAPIProperty(CdoMessage, CdoContact_EmailEmailAddress,
email.EmailAddress, vbString, CdoPropSetID3)
LetMAPIProperty(CdoMessage, CdoContact_EmailOriginalEntryID,
CdoMessage.ID, vbString, CdoPropSetID3)

Regards,
Tony
 
As I recall, Sig's code left out creating a property for
Email1AddressEntryID (and so on for the other email addresses). You would
need to create a GUID for that field.
 
Actually, you will need to create a one-off entry id - essentially it is
just a fixed prefix, then name, address and address type separated by 0x0.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top