Macro Needed...Simple I am sure

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

Guest

All I want in this macro is an automatic way to type out message so to speak.
For example I want to hit the macro button and it will automatically type
out the message in the email's body.
Can this be done?
 
Here's a simple one:

Public Sub PopulateBody()
On Error Resume Next
Application.ActiveInspector.CurrentItem.Body = "Your message here"
End Sub

If you want the message to contain HTML, change .Body to .HTMLBody (OL2002
and up I believe) and change the message to have the appropriate HTML tags
you want.

This will work if the macro is run from an open item.

Chris Fannin
Exchange, Outlook & VB Developer
 
It works, but Signature is not coming in the message.

Also the body of the message has to be typed in a single or continuous line.
If I gave a 2-line space between any two lines of the message, then it
displays a compile error.
 
It's always best to post the code that's wrong so everyone can take a look &
see where it's going wrong. There could be any number of reasons. Also
advise how you're adding the signature and what version of Outlook you're
using in case it's relevant.
 
Here is code that I am using,

Public Sub PopulateBody()

On Error Resume Next
Application.ActiveInspector.CurrentItem.Body = "Please find the enclosed
Audit Summary Report for the file audited on " & Date


End Sub

The above code just populate the message but not the signature.
 
Back
Top