A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Message Header



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 28th 07, 07:36 PM posted to microsoft.public.outlook.program_vba
John Lane
external usenet poster
 
Posts: 26
Default Message Header

How does one get at the message header programatically? I don't see a
property for it. Thanks.
  #2  
Old March 28th 07, 07:50 PM posted to microsoft.public.outlook.program_vba
John Lane
external usenet poster
 
Posts: 26
Default Message Header

And not see the popup message.

"John Lane" wrote:

How does one get at the message header programatically? I don't see a
property for it. Thanks.

  #3  
Old March 28th 07, 08:12 PM posted to microsoft.public.outlook.program_vba
John Lane
external usenet poster
 
Posts: 26
Default Message Header

Never mind. The intrinsic application object, eh?

"John Lane" wrote:

And not see the popup message.

"John Lane" wrote:

How does one get at the message header programatically? I don't see a
property for it. Thanks.

  #4  
Old March 28th 07, 08:34 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Message Header

Are you talking about the Internet headers for an e-mail?

If so, you need to use CDO to read the value of PR_TRANSPORT_MESSAGE_HEADERS
from a Field object, or use Redemption (http://www.dimastr.com).

If you have Outlook 2007, you can use VBA:

Sub DemoPropertyAccessorGetProperty()
Dim PropName, Header As String
Dim oMail As Object
Dim oPA As Outlook.PropertyAccessor
'Get first item in the inbox
Set oMail = _
Application.Session.GetDefaultFolder(olFolderInbox ).Items(1)
'PR_TRANSPORT_MESSAGE_HEADERS
PropName = "http://schemas.microsoft.com/mapi/proptag/0x007D001E"
'Obtain an instance of PropertyAccessor class
Set oPA = oMail.PropertyAccessor
'Call GetProperty
Header = oPA.GetProperty(PropName)
Debug.Print (Header)
End Sub

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"John Lane" wrote:

Never mind. The intrinsic application object, eh?

"John Lane" wrote:

And not see the popup message.

"John Lane" wrote:

How does one get at the message header programatically? I don't see a
property for it. Thanks.

  #5  
Old March 28th 07, 08:52 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Message Header

Read the PR_TRANSPORT_MESSAGE_HEADERS MAPI property using
1. Extended MAPI (C++/Ddelphi only)
2. CDO 1.21 (security prompt will be displayed)
3. Redemption (utl below).

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

"John Lane" wrote in message
...
How does one get at the message header programatically? I don't see a
property for it. Thanks.



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Header only showing no message Vern Outlook Express 1 February 14th 07 12:55 PM
message header not printing Graham Outlook - General Queries 1 February 12th 07 09:44 AM
header on forwarded message ES Outlook - General Queries 0 January 11th 07 12:05 AM
Message header still bold after it is opened Arthur Priver Outlook Express 2 May 8th 06 02:45 PM
Recipient appears twice in the message header Ed Outlook - General Queries 0 January 20th 06 04:01 PM


All times are GMT +1. The time now is 08:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.