Get contact ID

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)
 
S

Sue Mosher [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top