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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recepient Email address using VBA

Status
Not open for further replies.

neemi

Programmer
May 14, 2002
519
GB
Does anyone know how I can get the recepient email address from an email using VBA for an active email...

more details posted at thread707-1085805
 
Have a look at the recipients collection or the to property.

I love deadlines. I like the whooshing sound they make as they fly by
Douglas Adams
(1952-2001)
 
Something similar to the following (excerpt from a script i wrote so untested).

Code:
    Dim objNS As Outlook.NameSpace
    Dim MyFolder As Outlook.MAPIFolder

    Set objNS = Application.GetNamespace("MAPI")
    Set MyFolder = objNS.PickFolder

    For Each objItem In MyFolder.Items

        For Each Recip In objItem.Recipients
           addr = LCase(Recip.Address)
        Next

    Next

 
Just read my code... absolutely useless in itself, but should give you the general idea!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top