Move a flagged mail to a folder and forward it to a distribution l

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to Move a flagged mail to a folder and forward it to a distribution
list automatically.
I can create a rule to mve and forward the mail if the mail is a new one.
But I want the rule to be triggered when I flag the mail.
I tried to use the VBA for outlook, but still am unable to do it.
Please help.
 
You can't run a rule programmatically, unless you are referring to a macro
that is run by the "Run a script" option of a rule.

Regardless, you would have to monitor the MailItem_PropertyChange event and
trap when the FlagStatus property has changed (to olFlagMarked).

See this article for an explanation of how to do this:

Getting a Handle on Your E-mails with VBA:
http://blogs.officezealot.com/legault/articles/2224.aspx

However, you'll have to go further still. The code above is only good if
the user has opened the e-mail. Remember, you can flag a message in the
folder view. So to trap that, you'll need to monitor the
Explorer_SelectionChange event to get a handle to individual Inspectors as
the user selects them; then you monitor each of the items selected for the
PropertyChange event. This is best handled using an Inspector Wrapper:

Slovak Technical Services Code Samples:
http://www.slovaktech.com/code_samples.htm#InspectorWrapper
 
Back
Top