PC Review


Reply
Thread Tools Rate Thread

Access to message header from Outlook.MailItem

 
 
Jay Williams
Guest
Posts: n/a
 
      13th Nov 2003
When my VBA script runs upon receiving a particular e-mail
(activated by a rule), I want to look at the header
information for that e-mail. However, there wasn't a
Header property for the MailItem (which seems strange). Is
there a way to get at the header for that MailItem?

Thanks,
Jay
 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      14th Nov 2003
http://www.slovaktech.com/code_sampl...nternetHeaders

The headers aren't exposed to the Outlook object model. They are in a
CDO/MAPI property named PR_TRANSPORT_MESSAGE_HEADERS. You can use code
similar to the link I pointed you to for getting the Internet headers.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jay Williams" <a-(E-Mail Removed)> wrote in message
news:03a801c3aa27$e379e990$(E-Mail Removed)...
> When my VBA script runs upon receiving a particular e-mail
> (activated by a rule), I want to look at the header
> information for that e-mail. However, there wasn't a
> Header property for the MailItem (which seems strange). Is
> there a way to get at the header for that MailItem?
>
> Thanks,
> Jay



 
Reply With Quote
 
Jay Williams
Guest
Posts: n/a
 
      14th Nov 2003
What reference do I need to include for the interpreter to
be able to see the "MAPI" module? I'm getting a runtime
error saying it can't find the user defined type.

Thanks,
Jay

>-----Original Message-----
>http://www.slovaktech.com/code_sampl...nternetHeaders
>
>The headers aren't exposed to the Outlook object model.

They are in a
>CDO/MAPI property named PR_TRANSPORT_MESSAGE_HEADERS. You

can use code
>similar to the link I pointed you to for getting the

Internet headers.
>
>--
>Ken Slovak
>[MVP - Outlook]
>http://www.slovaktech.com
>Author: Absolute Beginners Guide to Microsoft Office

Outlook 2003
>Reminder Manager, Extended Reminders, Attachment Options
>http://www.slovaktech.com/products.htm
>
>
>"Jay Williams" <a-(E-Mail Removed)> wrote in message
>news:03a801c3aa27$e379e990$(E-Mail Removed)...
>> When my VBA script runs upon receiving a particular e-

mail
>> (activated by a rule), I want to look at the header
>> information for that e-mail. However, there wasn't a
>> Header property for the MailItem (which seems strange).

Is
>> there a way to get at the header for that MailItem?
>>
>> Thanks,
>> Jay

>
>
>.
>

 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      14th Nov 2003
CDO 1.21 (CDO.DLL). It's an optional installation from the Office CD
for Outlook 2000 and later. It's listed as Collaboration Data Objects
in the Outlook installation options.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jay Williams" <(E-Mail Removed)> wrote in message
news:0cfe01c3aabf$a8e1c670$(E-Mail Removed)...
> What reference do I need to include for the interpreter to
> be able to see the "MAPI" module? I'm getting a runtime
> error saying it can't find the user defined type.
>
> Thanks,
> Jay



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MailItem UserProperties in OWA (Outlook Web Access) nigol69@gmail.com Microsoft Outlook VBA Programming 5 23rd Apr 2007 11:18 AM
Re: Get Outlook mailitem internet headers Message-id value for use in Dmitry Streblechenko \(MVP\) Microsoft Outlook VBA Programming 1 20th Sep 2004 06:57 PM
Get Outlook mailitem internet headers Message-id value for use in =?Utf-8?B?RGVhbg==?= Microsoft Outlook VBA Programming 0 17th Sep 2004 05:55 PM
How to get a CDO Message object form a Outlook.MailItem ? Gilles Lambert Microsoft Outlook VBA Programming 3 7th Jul 2004 06:45 PM
How to Retrieve Header Info from MailItem The Ricster Microsoft Outlook Interoperability 2 16th Mar 2004 01:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:44 PM.