Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Outlook - Pull contact from Outlook into Excel

Hi --

Wondering what the command line is to pull up the Select Name:Contacts
dialogue box in Outlook is from Excel -

What I am trying to do is to make it so I can have a user select a contact
from the select name dialogue box while in Excel and then dump the contact
info into Excel once they have selected a contact.

Thank you in advance --

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Outlook - Pull contact from Outlook into Excel

You will need to add CDO 1.21 to your list of references. The following
code shows the Select Names box, allows you to select a recipient, and do
something with it:-

Dim objSession As New MAPI.Session
Dim objRecips As MAPI.Recipients
Dim objRecip As MAPI.Recipient
objSession.Logon , , False, False
Set objRecips = objSession.AddressBook(, "Select Name", True, _
False, 1, "Recipients")
Set objRecip = objRecips.Item(1)
MsgBox objRecip.Name
Set objRecip = Nothing
Set objRecips = Nothing
objSession.Logoff
Set objSession = Nothing

--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Rubble" wrote:

Hi --

Wondering what the command line is to pull up the Select Name:Contacts
dialogue box in Outlook is from Excel -

What I am trying to do is to make it so I can have a user select a contact
from the select name dialogue box while in Excel and then dump the contact
info into Excel once they have selected a contact.

Thank you in advance --

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel-Outlook Contact List [email protected] Excel Discussion (Misc queries) 1 July 9th 08 09:40 PM
selecting a contact from Outlook for Excel Oggy Excel Programming 0 April 3rd 07 07:03 PM
Outlook contact linked to name in Excel bdesaul Excel Discussion (Misc queries) 2 January 29th 07 12:04 AM
Push Button in Outlook to Change Focus to Outlook Contact List Cole Excel Programming 0 October 25th 06 11:29 PM
How can I link an Excel cel with an Outlook contact? Lou Excel Programming 3 July 22nd 06 12:42 AM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"