I'm using the below code to open the Global Address Window, but since updating to Office 365 it is no longer opening. I have done many searches online but can't find anyone experiencing the same issue. Can anyone assist?
CODE:
Dim cdoSession, cdoAddressBook, olkRecipients, objAE
On Error Resume Next
Set cdoSession = CreateObject("MAPI.Session")
cdoSession.Logon "", "", False, False
Set olkRecipients = cdoSession.AddressBook(, "Global Address List", 0, False)
For Each objAE In olkRecipients
'MsgBox objAE.Name
TextBox1.Value = objAE.Name
Next
Set olkRecipients = Nothing
cdoSession.Logoff
Set cdoSession = Nothing
I added a reference to Microsoft Outlook 16 Object Library and then updated the code to the below, it is functioning appropriately now: