Hi,
I am trying to open Outlook Address Book from Access using some VBA code.I am able to display each member's name in a Message Box but just not able to open the Address Book to allow users to select a user and shoot an email.
Following is the code that I am using
Any suggestions/help
Thanks,
Abhishek
Public Function GetAddressList()
Dim myOlApp As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myAddressList As Outlook.AddressList
Set myOlApp = CreateObject("Outlook.Application"
Set myNameSpace = myOlApp.GetNamespace("MAPI"
'Set myAddressList to the Global Address List within the AddressLists collection.
Set myAddressList = myNameSpace.AddressLists("Global Address List"
For Each memberentry In myAddressList.AddressEntries
MsgBox memberentry
Next
End Function
I am trying to open Outlook Address Book from Access using some VBA code.I am able to display each member's name in a Message Box but just not able to open the Address Book to allow users to select a user and shoot an email.
Following is the code that I am using
Any suggestions/help
Thanks,
Abhishek
Public Function GetAddressList()
Dim myOlApp As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myAddressList As Outlook.AddressList
Set myOlApp = CreateObject("Outlook.Application"
Set myNameSpace = myOlApp.GetNamespace("MAPI"
'Set myAddressList to the Global Address List within the AddressLists collection.
Set myAddressList = myNameSpace.AddressLists("Global Address List"
For Each memberentry In myAddressList.AddressEntries
MsgBox memberentry
Next
End Function