I found this proven VB code on the internet, copy/pasted it but I get a "Method or data member not found" error on the line SET OLA=APPLICATION .SESSION... What am I doing wrong? Thanks -Ken.
Only needs "Microsoft Outlook xx.x Object Library - I used 11.0)
Only needs "Microsoft Outlook xx.x Object Library - I used 11.0)
Code:
Private Sub cmdAddress_Book_Click()
'---- create an listbox (I named it ab - Address Book)
Dim ola As Outlook.AddressList
Dim ole As Outlook.AddressEntry
On Error Resume Next
Set ola = Application.Session.AddressLists("Contacts")
For Each ole In ola.AddressEntries
ab.AddItem ole
Next
Set ola = Nothing
Set ole = Nothing
End Sub
Comment