Standard reply

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

Guest

I'm use to recording macros in Word, but don't know VB. After I've clicked
'Reply' to an e-mail, I would like a macro to insert a specific file as text.
At the moment, I have to click in turn Insert, File, then indicate the file,
then click Insert as Text.

I'd be very gratefule for help.
 
Am Mon, 19 Jun 2006 09:17:02 -0700 schrieb Myint Su:

You can start with this:

Public ReplyWithTemplate()
Dim Reply As Outlook.MailItem

If Application.ActiveExplorer.Selection.Count Then
Set Reply = Application.ActiveExplorer.Selection(1).Reply
Reply.Body = GetTemplate & Reply.Body
Reply.Send
Endif
End Sub

Private Function GetTemplate() As String
....
End Sub

Please complete the sample yourself and write code into the function
GetTemplate. For reading a file´s content you could use e.g. the "Microsoft
Scripting Runtime" library, which you then need to set a reference on via
Tools/References.

If you are ready you can add a button to your toolbar that starts the public
method. Use that button instead of Outlook´s Reply button.
 
Back
Top