IanGalletly
Programmer
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'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