How do I push fields of an email to a script, application or actio

J

John Drakey

I want to take the from name and from address portion of an email and send
them to an application for processing.

Is there a way to isolate these fields?

I have not found any links that provide help on how to use the options "Run
a script", "Start application" or "Perform Custom Action".

I know that an entire folder can be exported from outlook, but I want to
only process emails with other conditions.

I appreciate any help in advance.
 
M

Michael Bauer [MVP - Outlook]

With VBA, you can use Outlook's obejct model to read the data. This is how
the declaration of a Run a Script code looks like:

Public Sub AnyName(Mail As Outlook.MailItem)
' read the sender's address
Debug.Print Mail.SenderEMailAddress
End Sub

Open the VBA environment (ALT+f11) and copy the code into the module
"ThisOutlookSession". You can then assign it to the rule.

You might open the object brwoser (f2), switch from <All libraries> to
Outlook and see what objects, properties etc. are available.

--
Best regards
Michael Bauer - MVP Outlook
Use Outlook Categories? This is Your Tool:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Wed, 6 Feb 2008 09:01:06 -0800 schrieb John Drakey:
 
J

John Drakey

Thanks for the help Michael.

I've been to the store and looked for some good books on VBA for outlook.
Everything I'm finding is for 2007. Any good recommendations for me to look
for on Amazon or the Used Bookstore? We're still using 97 unfortunately.
Unless you think that there haven't been enough changes with this API to
matter.

Again Thanks for your help.
 
Top