Outlook objects don't expose the SMTP header. You must use CDO or Redemption. See http://www.slipstick.com/dev/olforms/headers.htm for a sample.
--
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
http://www.slipstick.com/books/jumpstart.htm
Quote:
> I would like to write a VBA script that I can invoke from a rule whenever an
> email arrives that:
> 1. checks if a certain string can be found in the "internet header" or SMTP
> header of the message (e.g. X-Text-Classification: foo)
> 2. grabs the string after the colon (e.g. "foo")
> 3. And assigns that to a field (e.g. category) of the message
> I'm a novice at VBA in outlook, and I've been able to write a script which
> works on the message but I can't find any properties or methods which allow
> me to examine the "internet header" of the message.
> Can it be done?