This is a Outlook VBA question - but I am sure someone will be able to provide me with an answer.
I want to be able to change the default Outlook Address List that is displayed in the Address Book Dialog box. I have the code below to display the Outlook Address book.
Private Sub cmd_address_click()
Dim objsession As Object
Dim adbook As Object
'creates link to outlook
Set objsession = CreateObject("MAPI.Session")
objsession.Logon , , False, False
On Error Resume Next
' show address book
Set adbook = objsession.AddressBook(, _
"Address Book", , , , , "")
Set objsession = Nothing
Set adbook = Nothing
End Sub
I want to be able to specify which address list is shown - eg. "Global Address List"
I am using Office 97 - so am codeing Outlook from Excel. Any help greatly appreciated.
I want to be able to change the default Outlook Address List that is displayed in the Address Book Dialog box. I have the code below to display the Outlook Address book.
Private Sub cmd_address_click()
Dim objsession As Object
Dim adbook As Object
'creates link to outlook
Set objsession = CreateObject("MAPI.Session")
objsession.Logon , , False, False
On Error Resume Next
' show address book
Set adbook = objsession.AddressBook(, _
"Address Book", , , , , "")
Set objsession = Nothing
Set adbook = Nothing
End Sub
I want to be able to specify which address list is shown - eg. "Global Address List"
I am using Office 97 - so am codeing Outlook from Excel. Any help greatly appreciated.