Retrieving custom headers from an Outlook MailItem

A

Andrew

Hello All,

Development Environment: Visual Studio 2008
Language: VB.Net
Outlook 2003 and 2008


Is it possible retrieve custom headers from an Outlook MailItem. I've been
trying to, but it seems that the "MailItem.PropertyAccessor.GetProperty"
method can only see Outlook's "core" headers.

Thanks,
 
D

Dmitry Streblechenko

Do you specify the property name in teh DASL format?
Are you sure that property exists? Can you see it in MFCMAPI or OutlookSpy?

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

Andrew

The property is being set in an external application which created the email.
When I open the email in Oultook and look at the header information in the
message options, the headers with their values are shown. This is two of them
along with how its formatted:

X-PW-PROJECTID: 9
X-PW-SOURCE: Task Manager
 
D

Dmitry Streblechenko

Unless that particular header was already parsed into a separate property by
Outlook (don't count on that), parsing the whole header is the only way to
do that

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

Andrew

Thanks :)

Dmitry Streblechenko said:
Unless that particular header was already parsed into a separate property by
Outlook (don't count on that), parsing the whole header is the only way to
do that

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

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