D
Dominic
Hello,
My goal was to programatically access
a recipiant's details (First Name, Last Name, Department,
Phone Number, Email, etc...) from a Distribution list
(Global Address List).
I got as far as accessing a specific contact using the
AddressEntry object, but i cant retrieve any details
other than the name. Please help.
Thank you,
Dominic
Here is my code:
'***********************************
'Start instance of Outlook
Dim myApp As New Outlook.Application
'Reference the Outlook namespace and use MAPI
Dim myNS As Outlook.NameSpace
Set myNS = myApp.GetNamespace("MAPI")
'Open the AddressList you want to use
Dim myAddressList As Outlook.AddressList
Set myAddressList = myNS.AddressLists("Global Address
List")
'Create Address entry list
Dim myAddressEntries As Outlook.AddressEntries
Set myAddressEntries = myAddressList.AddressEntries
'Create Address entry object
Dim myAddressEntry As Outlook.AddressEntry
'Retrieve first contact in Global Address List
Set myAddressEntry = myAddressEntries.GetFirst
'***********************************
My goal was to programatically access
a recipiant's details (First Name, Last Name, Department,
Phone Number, Email, etc...) from a Distribution list
(Global Address List).
I got as far as accessing a specific contact using the
AddressEntry object, but i cant retrieve any details
other than the name. Please help.
Thank you,
Dominic
Here is my code:
'***********************************
'Start instance of Outlook
Dim myApp As New Outlook.Application
'Reference the Outlook namespace and use MAPI
Dim myNS As Outlook.NameSpace
Set myNS = myApp.GetNamespace("MAPI")
'Open the AddressList you want to use
Dim myAddressList As Outlook.AddressList
Set myAddressList = myNS.AddressLists("Global Address
List")
'Create Address entry list
Dim myAddressEntries As Outlook.AddressEntries
Set myAddressEntries = myAddressList.AddressEntries
'Create Address entry object
Dim myAddressEntry As Outlook.AddressEntry
'Retrieve first contact in Global Address List
Set myAddressEntry = myAddressEntries.GetFirst
'***********************************