Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Microsoft Exchange
Expertise: Beginner
Aug 9, 2000

Adding Message to Forwarding E-mail

Question:
My company wishes to do some special e-mail forwarding. Is there a way to take an incoming message, place a message at the top or in the subject line, and then forward this as one message?

Answer:
If it's o.k. for Outlook to be running at the time, you could create a VBA macro that does this pretty easily. Just create the code in the NewMail event to do something like this:

Set oNS = Outlook.Application.GetNamespace("MAPI")
    Set oInbox = oNS.GetDefaultFolder(6)
    Set oMsg = oInbox.Items.GetFirst()
    Set oFwd = oMsg.Forward
    oFwd.Body = "[Insert your text here]" & vbLf & vbLf & oMsg.Body
    Set oFwdRecip = oFwd.Recipients.Add("[insert recipient addresses here]")
    oFwd.Send
Note that this will only work while Outlook is running. If you're good at VB Script you could do something similar and have it run server-side.
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date