View Single Post
  #5  
Old November 4th 08, 07:24 PM posted to microsoft.public.outlook.program_vba
TerryM
external usenet poster
 
Posts: 8
Default Email Forwarding

That's more of what I was looking for, but like I stated before. I'm
relatively new to VBA programming especially in Outlook. Were more of a
Delphi place, what would the code that I'm requiring look like?

"Ken Slovak - [MVP - Outlook]" wrote:

In that case handle either the NewMailEx event or the Item.Add event on the
Items collection of the Inbox. If you handle NewMailEx then you'd get a
string of all the EntryID's of the incoming items, separated by commas. You
can use the Split function to split those into an array of EntryID's. Use
NameSpace.GetItemFromID with each EntryID to get the item, then use string
functions to parse the Body looking for your catch phrase. Also check for
SenderName and/or SenderEmailAddress to see who sent the item to you. Then
use the Forward method to send the item wherever you want.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"TerryM" wrote in message
...
What you wrote is totally true except for the fact that Exchange by
default
disables automatic forwarding to external sources. That is the reason why
I
was wanting code to basically take the email with the specific sender and
text in the body and automatically create a new email and send it out.
This
way Exchange doesn't view it as a forward to an outside location.

You can manually send to outside locations, however you can't
automatically
forward emails to outside locations without enabling this function. And
that
security wise is something I do not want to do.



Ads