Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lookup an email address in Outlook based on Username (newbie quest
http://tinyurl.com/7fuly
should give you many ideas -- Regards, Tom Ogilvy "HP" wrote in message ... 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 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lookup an email address in Outlook based on Username (newbie quest
On Fri, 19 Aug 2005 06:54:01 -0700, "HP"
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message ... 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 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I link an email address in a cell to a MS Outlook template | Excel Discussion (Misc queries) | |||
Stop launching outlook when I click on an email address? | Excel Discussion (Misc queries) | |||
transfer email address cells from excel to outlook | Excel Discussion (Misc queries) | |||
worksheet email address to outlook xpress contact | Excel Worksheet Functions | |||
Put Email Address from Excel to Outlook | Excel Programming |