View Single Post
  #6  
Old April 16th 10, 08:38 AM posted to microsoft.public.outlook.program_vba
_M_a_t_t_[_2_]
external usenet poster
 
Posts: 12
Default Outlook Macro to get Exchange Info from Mail

The contact does not exist in the local address book. What I want to access
is the contact information you can access when right clicking on From name
and choosing Outlook Properties. With non exchange senders, you Display
name, E-mail address, E-mail type, and Internet format. When its an Exchange
mail, you get (provided entered), shipping address, phone number(s), country
etc. Its this information I'd like to access directly from the Email (as the
contact isn't in the local address book, and I'm reading in, parcing and
displaying information from the email). However, I can not install additional
plug-ins. I need to be able to do this with what Outlook already has. I'm
assuming this can be done with Microsoft CDO 1.21 Reference and/or MAPI, but
I need an example of how to access the information from the email and contact
in 1 loop (or perhaps via a sub function called from the main loop. Again I'm
currently using this formation to read out the information from the Email:

Dim olkItem As Outlook.MailItem
For Each olkItem In Application.ActiveExplorer.Selection
'Read the info and enter it into the dialog
'Example info: MsgBox olkItem.SenderEmailAddress
Next

And this works fine (as long as only 1 mail is selected, more then one
causes problems, since each would be processed, but only the last selected
would actually be displayed).

Matt

"Dmitry Streblechenko" wrote:

So d oyo uwant to access EX specific properties of a contact that was create
in the hContacts folder from one of the GAL entries?
Or EX properties of a message sender/recipient?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-


Ads