newbie request: how to build a macro to move messages into a folder based on a message custom field

  • Thread starter Thread starter Cristi@n
  • Start date Start date
C

Cristi@n

Hi Group,

I know it is never the case to post a request for source code to a
newsgroup, but I am a total newbie in Outlook programming and I have a
serious issue with SPAM over here. I'd like to send all the messages
that I receive to a specific folder based on the property value
(External) of a custom field called 'Message Type'.

Thank you for reading this message and for any time you'd like to
dedicate to help me.

Ciao,
Cristian
 
Where is this property? Is it inside the Internet headers as an X-header or
is it an actual Outlook UserProperty or MAPI property in the items?
 
It's in the Message Property Tage 0x8203 which is set by the Exchange
Server to "External" for messages coming from Internet. I would like to
build a script to redirect these messages to folder "Junk Mail".

Thanks for the help!

Regards,
Cristi@n
 
Please post parts of the preceding thread so it can be followed. You aren't
doing that and it makes it hard to follow a conversation.

You can't use the Outlook object model for that, you'd have to use CDO 1.21
(optional installation for Outlook 2000 and later) or Redemption
(www.dimastr.com/redemption) for that. You cannot use Extended MAPI in
VBA/VB code.

You will need to generate a property tag for that field and access it from a
CDO Message item's Fields collection or the equivalent Redemption item. I'm
not familiar with that property, my Exchange server doesn't add it to emails
coming in over the Internet.

One suggestion, why not just use PR_TRANSPORT_MESSAGE_HEADERS (0x007D001E),
which is a standard MAPI property (you'd still need CDO or Redemption).
Items sent within an Exchange org don't have that property, items from
external sources do have it.
 
Back
Top