Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default MS Exchange Macro

I have a macro that opens the Address Book on our server and then you put in
the display name you want and it gives you a certain set of pre-determined
info. (This works great).

I want to cut out the Address Book part and have it read from a list
instead. I am a little stuck. Here is the code:
I have a spreadsheet that contains the PR_DISPLAY_NAME. I know how to
create the loop, just need a little assistance with the objRecipients and
LoadFieldsFromAB subroutine.


HomeServer = ""
strProfileInfo = "ct00" & vbLf & "anon"
Set objSession = CreateObject("MAPI.Session")
objSession.logon , , False, False, , True, strProfileInfo

Set objRecipients = objSession.AddressBook(, "Select Account", True, True,
0)
LoadFieldsFromAB objRecipients.Item(1).AddressEntry

----------------------------------------------------------------------------
Sub LoadFieldsFromAB(objAccount)

DisplayName = objAccount.fields(PR_DISPLAY_NAME).Value
DisplayAccount = objAccount.fields(PR_ACCOUNT).Value
HomeServer = objAccount.fields(PR_EMS_AB_HOME_MTA).Value
strSMTPdomain = "frd.com"

MsgBox (DisplayName)
MsgBox (DisplayAccount)
MsgBox (Mid(HomeServer, 47, 11))

Set objSession = Nothing


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
Exchange folders Scott Flanders New Users to Excel 0 September 22nd 08 02:17 PM
Gift Exchange Help! Marina B Excel Worksheet Functions 1 December 6th 07 10:22 PM
How do I exchange data between worksheets? TucAO New Users to Excel 2 June 27th 07 11:06 PM
Foreign Exchange peterthistle Excel Discussion (Misc queries) 2 November 21st 05 02:19 PM
DDE Argument exchange with Word Steve Excel Programming 0 February 5th 04 09:57 PM


All times are GMT +1. The time now is 09:25 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"