LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Pull Recipient from Outlook Address book

Hi All,

I'm trying to get an Outlook display name from an outlook address book and
put it in a text box. I can open the address book, but can't seem to find a
way to get the display name. Any and all help would be greatly appreciated.
See the script below. Thanks -BigPig-

Set appOutlook = CreateObject("Outlook.Application")
Set CDOSession = appOutlook.CreateObject("MAPI.Session")

CDOSession.Logon "", "", False, False, 0

On Error GoTo ErrHand
Set Recipients = CDOSession.addressbook(Nothing, "Address Book", False,
True, 1, "To:", "", "", 0)

Dim OLDN As String
OLDN = Recipients
Stop
txt_SUYI_OutL_Display_Name = OLDN
Set appOutlook = Nothing
Set CDOSession = Nothing

ErrHand:
Set appOutlook = Nothing
Set CDOSession = Nothing
Exit Sub

txt_SUYI_OutL_Display_Name = OLDN

Set appOutlook = Nothing
Set CDOSession = Nothing

 
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
e-mail address via outlook address book Erik Excel Programming 0 October 17th 06 11:21 PM
Outlook Address Book Allan Excel Discussion (Misc queries) 1 November 19th 05 10:00 PM
How do I import Office address book to Outlook Express address bo. snnorp Excel Discussion (Misc queries) 2 February 22nd 05 11:47 AM
How to insert an address from Outlook 2003 address book ? Dubois Excel Programming 0 September 27th 04 09:26 AM
Address Book - Outlook Thompson, Joseph[_2_] Excel Programming 1 August 21st 04 03:03 AM


All times are GMT +1. The time now is 04:33 AM.

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

About Us

"It's about Microsoft Excel"