Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook 2000: How do I retrieve an Email Address

Status
Not open for further replies.

IanGalletly

Programmer
Jun 17, 2003
16
0
0
GB
Once I have a objMailItem set up, how do I get to the actual email address of the recipient if the recipient is recognised by outlook and therefore the '.To' returns the 'Display Name' rather than the email address.

I'm sure this should be blindingly simple - I'm just going round in circles!



Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNamespace("MAPI")

Set objInBoxFolder = objNameSpace.GetDefaultFolder(olFolderInbox)


For Each objMailItem In objInBoxFolder.Items

With objMailItem

OTE_InBoxTo = .To

' Need OTE_InBoxTo to have actual email address
' e.g. ian.galletly@host.co.uk
' If ian.galletly@host.co.uk is setup as a contact's
' email Address I'm getting 'Ian Galletly'


End With

Next objMailItem



Any help would be appriciated
 
I think u will double click that display name u can see the actual email address.

PSingh
 
I cant' answer your question, but you might get better responses in the VBA forum - forum707
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top