+ Reply to Thread
Results 1 to 5 of 5

Lookup an email address in Outlook based on Username (newbie quest

  1. #1
    HP
    Guest

    Lookup an email address in Outlook based on Username (newbie quest

    Hi,

    Apologies if this question has been asked before - please direct to an
    appropriate post if it has :-)

    I have a column of usernames in an Excel spreadsheet and I would like to
    find the corresponding email address by taking the username and doing a
    lookup on all the email addresses in a global address list (by comparing the
    username in the spreadsheet and username in Outlook, and returning the email
    address if a match is found).

    Anyone have any ideas how I could do this - or even if it is possible.

    many thanks in advance.

  2. #2
    Tom Ogilvy
    Guest

    Re: Lookup an email address in Outlook based on Username (newbie quest

    http://tinyurl.com/7fuly

    should give you many ideas

    --
    Regards,
    Tom Ogilvy

    "HP" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > Apologies if this question has been asked before - please direct to an
    > appropriate post if it has :-)
    >
    > I have a column of usernames in an Excel spreadsheet and I would like to
    > find the corresponding email address by taking the username and doing a
    > lookup on all the email addresses in a global address list (by comparing

    the
    > username in the spreadsheet and username in Outlook, and returning the

    email
    > address if a match is found).
    >
    > Anyone have any ideas how I could do this - or even if it is possible.
    >
    > many thanks in advance.




  3. #3
    Richard Buttrey
    Guest

    Re: Lookup an email address in Outlook based on Username (newbie quest

    On Fri, 19 Aug 2005 06:54:01 -0700, "HP"
    <[email protected]> wrote:

    >Hi,
    >
    >Apologies if this question has been asked before - please direct to an
    >appropriate post if it has :-)
    >
    >I have a column of usernames in an Excel spreadsheet and I would like to
    >find the corresponding email address by taking the username and doing a
    >lookup on all the email addresses in a global address list (by comparing the
    >username in the spreadsheet and username in Outlook, and returning the email
    >address if a match is found).
    >
    >Anyone have any ideas how I could do this - or even if it is possible.
    >
    >many thanks in advance.


    I use this to identify whether a name in a Cell is to be found in an
    Outlook contact list. No doubt you could modify it slightly to achieve
    your task. I actually enclose it in a Loop so that the
    range("emailname") changes each time.

    Dim olApp As Outlook.Application
    Dim myrecipient
    Dim Txtto As String

    Set olApp = New Outlook.Application
    Txtto=range("emailname")
    Set myrecipient = olMail.Recipients.Add(Txtto)
    If myrecipient.Resolve Then
    MsgBox "Valid eMail Name"
    else: MsgBox "Invalid eMailName"
    End if


    HTH



    __
    Richard Buttrey
    Grappenhall, Cheshire, UK
    __________________________

  4. #4
    HP
    Guest

    Re: Lookup an email address in Outlook based on Username (newbie q

    Hi Richard,

    Many thanks for your reply.
    I tried your code and am getting the following error message: 'invalid
    qualifier' and it is pointing to the line Set myrecipient =
    olMail.Recipients.Add(Txtto)
    I'm not too sure, but should olMail be set somewhere before this line?

    cheers,
    HP

    "Richard Buttrey" wrote:

    > On Fri, 19 Aug 2005 06:54:01 -0700, "HP"
    > <[email protected]> wrote:
    >
    > >Hi,
    > >
    > >Apologies if this question has been asked before - please direct to an
    > >appropriate post if it has :-)
    > >
    > >I have a column of usernames in an Excel spreadsheet and I would like to
    > >find the corresponding email address by taking the username and doing a
    > >lookup on all the email addresses in a global address list (by comparing the
    > >username in the spreadsheet and username in Outlook, and returning the email
    > >address if a match is found).
    > >
    > >Anyone have any ideas how I could do this - or even if it is possible.
    > >
    > >many thanks in advance.

    >
    > I use this to identify whether a name in a Cell is to be found in an
    > Outlook contact list. No doubt you could modify it slightly to achieve
    > your task. I actually enclose it in a Loop so that the
    > range("emailname") changes each time.
    >
    > Dim olApp As Outlook.Application
    > Dim myrecipient
    > Dim Txtto As String
    >
    > Set olApp = New Outlook.Application
    > Txtto=range("emailname")
    > Set myrecipient = olMail.Recipients.Add(Txtto)
    > If myrecipient.Resolve Then
    > MsgBox "Valid eMail Name"
    > else: MsgBox "Invalid eMailName"
    > End if
    >
    >
    > HTH
    >
    >
    >
    > __
    > Richard Buttrey
    > Grappenhall, Cheshire, UK
    > __________________________
    >


  5. #5
    HP
    Guest

    Re: Lookup an email address in Outlook based on Username (newbie q

    Thanks Tom - looks like I may have found something that will do the trick.

    cheers,
    HP

    "Tom Ogilvy" wrote:

    > http://tinyurl.com/7fuly
    >
    > should give you many ideas
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "HP" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > >
    > > Apologies if this question has been asked before - please direct to an
    > > appropriate post if it has :-)
    > >
    > > I have a column of usernames in an Excel spreadsheet and I would like to
    > > find the corresponding email address by taking the username and doing a
    > > lookup on all the email addresses in a global address list (by comparing

    > the
    > > username in the spreadsheet and username in Outlook, and returning the

    > email
    > > address if a match is found).
    > >
    > > Anyone have any ideas how I could do this - or even if it is possible.
    > >
    > > many thanks in advance.

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1