Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Exchange folders | New Users to Excel | |||
Gift Exchange Help! | Excel Worksheet Functions | |||
How do I exchange data between worksheets? | New Users to Excel | |||
Foreign Exchange | Excel Discussion (Misc queries) | |||
DDE Argument exchange with Word | Excel Programming |