You can read existing headers from the PR_TRANSPORT_MESSAGE_HEADERS
proeprty, accessible through MAPI/CDO 1.21/Redemption or PropertyAccessor in
OUtlook 2007.
If you need to ste a custom property on an outgoing message, you will need
to set a special named property - see
http://www.dimastr.com/redemption/faq.htm#14
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Salad" wrote in message
m...
When I post this message, in the header it will contain an Xref number. It
contains the newsgroup and an identifier number
microsoft.public.outlook.program_vba:69193.
Some background info first. Looking at a header in a personal e-mail (not
Usenet) there is no Xref but it would be nice. For example, let's say I
had Customer Joe Blow and the ID for the customer record was 123, if there
were an Xref I could write to prior to sending, it might look like
Customer:123. If I could read the header, I'd know that the the document
was associated with the Customer table for Customer 123. Or
MyDatabaseAppBE:Customer:123 and it would know the database to update
would be MyDatabaseAppBE for Customer 123.
I could, of course, put something in the subject or body like C123 and a
program could parse it out so it knows it is associated with Customer 123.
The downside of course is that the person responding could remove that
identifier by changing the subject line or snipping the body.
When I send a personal email, in the message header there is a MessageID
value. Something like
The reply will have something like
so one knows which message this was in reference to. Also, there is a
reference number. Something like
Now if the original message was forwarded to somebody else and then the
person that received the forwarded the message to you, the References
value would contain both my MessageID and the MessageID of the person that
forwarded the message and might look like
The MessageID will be that person's message identifier, in this case
.
The In-Reply-To would contain the person's message ID that forwarded the
message and in this example it might be something like
We can see the id of the message it was forwarded from, not my original
MessageID of .
My questions. Can I write a value to a message header prior to sending
the email?
If not, when I send a message using Outlook, how can I read/determine the
MessageID when it is sent? Typically I would be sending the email from
another application using VBA...in this case Access. So when I do a
.Send, I would need to read/determine the MessageID of the message and
then I could store that to a table. I could also do my own record
association.
Last question. How can I read the message header to parse/determine the
In-Reply-To and/or References lines?
Thanks for any help.