Help!

Auto-Forward Macro

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Programming VBA RSS
Next:  Changing Outlook & Office 2007 from Enterpris..  
Author Message
DavidW



Joined: Jul 16, 2008
Posts: 2



PostPosted: Wed Jul 16, 2008 12:12 pm    Post subject: Auto-Forward Macro

I am trying to design a macro for Outlook 2007 that will enable me to click on an item, then run the macro and either create a new mail item with the attachement from the original message or bring up a forward message, and replace the body text with a pre-set paragraph of text. I've seen some other threads showing how to write the text in as html, but I can't figure out the references to get the item to forward.

My previous experience with VBA is limited to Excel.
Back to top
DavidW



Joined: Jul 16, 2008
Posts: 2



PostPosted: Wed Jul 16, 2008 12:53 pm    Post subject:

I have been able to come up with the following. This will forward an e-mail which is already open, but I'm trying to learn to forward the e-mail from within the main outlook window.


Dim objMail As Outlook.MailItem, objNewMail As Outlook.MailItem
Set objMail = Application.ActiveInspector.CurrentItem
Set objNewMail = objMail.Forward
objNewMail.Display
objNewMail.Subject = Right(objNewMail.Subject, Len(objNewMail.Subject) - 4) 'To remove FW:
objNewMail.HTMLBody = "<html><body>Good Day!<br>SignitureMessage</body></html>"
objNewMail.CC = "none@none.com"
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Programming VBA All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum