O
OU_MartynF
I am trying to insert a block of standard text into a reply message.
Basically when I receive a message I would like to be able to click on reply
and then run a macro that will insert a standard block of text. I have found
some code that nearly works but instead of replying to the original message
it creates a new email to the sender and retains the subject field. It does
however insert the standard text.
It it possible to retain the original message text somehow ?
I am using Outllook 2003 and this is my code
Sub InsertText()
Dim objApp As Outlook.Application
Dim objMsg As Outlook.MailItem
On Error Resume Next
Set objApp = CreateObject("Outlook.Application")
Set objMsg = objApp.ActiveInspector.CurrentItem.Reply
With objMsg
.BodyFormat = olFormatHTML
.HTMLBody = "<p>Standard text block here</p>"
End With
objMsg.Display
Set objMsg = Nothing
Set objApp = Nothing
End Sub
Thanks in advance.
Martyn
Basically when I receive a message I would like to be able to click on reply
and then run a macro that will insert a standard block of text. I have found
some code that nearly works but instead of replying to the original message
it creates a new email to the sender and retains the subject field. It does
however insert the standard text.
It it possible to retain the original message text somehow ?
I am using Outllook 2003 and this is my code
Sub InsertText()
Dim objApp As Outlook.Application
Dim objMsg As Outlook.MailItem
On Error Resume Next
Set objApp = CreateObject("Outlook.Application")
Set objMsg = objApp.ActiveInspector.CurrentItem.Reply
With objMsg
.BodyFormat = olFormatHTML
.HTMLBody = "<p>Standard text block here</p>"
End With
objMsg.Display
Set objMsg = Nothing
Set objApp = Nothing
End Sub
Thanks in advance.
Martyn