Get contact ID

  • Thread starter Thread starter Danny
  • Start date Start date
D

Danny

How do I get the actual ID for the contact that I've
opened to be able to create a journal entry with the
actions menu to create a file in word or excel but adding
the actual contact.

Set myOlApp = CreateObject("Outlook.Application")
Set myOlApp = CreateObject("Outlook.Application")

Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set mycontacts = myNameSpace.GetDefaultFolder
(olFolderContacts)
mycontactId = mycontacts.items(olContactItem)
 
The currently open item is returned by Application.ActiveInspector.CurrentItem.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top