View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Returning Outlook email addresses

change
strEmail = itm.email

to

strEmail = itm.email1address

would be my guess, but this is an excel group and an outlook group would
probably be more helpful.

--
Regards,
Tom Ogilvy

"GeorgeFD29" wrote in message
...
I have the following code working - talking to outlook. However,

whenever I
try to return the email address of the contact, I get 'object doesn't

support
this property or method' thanks for any help.

Dim OLF As Outlook.MAPIFolder
Dim olContactItem As Outlook.ContactItem
Dim ToContact As Recipient
Set OLF = GetObject("",

"Outlook.Application").GetNamespace("MAPI").GetDef aultFolder(olFolderContact
s)

Set itms = OLF.Items

For i = 1 To itms.Count
Set itm = itms(i)
strContactName = itm.LastName & ", " & itm.FirstName & " " &

itm.MiddleName
strEmail = itm.email
Next