Outlook automatic reply that retains body text of the incoming message

microsoft-outlookmicrosoft-outlook-2010rules

I'm able to create a rule that replies to incoming emails with a template. That works as designed, however I would like for the reply to quote the original incoming email just like it would appear if I manually replied to it. At the moment the replies only have the template and nothing else.

I can't seem to figure out if this is possible – has anyone done it, and how?

Edit: More info – this is Outlook 2010 client on Windows 7. Server is Microsoft Exchange Server 2010 SP1 build 14.1.218

Best Answer

The article Copy body of email to Auto-reply in Outlook 2007 suggests the following script as solution:

Sub AutoReply(Item As Outlook.MailItem)
    Dim olkReply As Outlook.MailItem
    Set olkReply = Item.Reply
    With olkReply
        'Change the subject on the next line as desired'
        .Subject = "Your Subject Goes Here"
        'Change the body as desired'
        .HTMLBody = "Your reply text goes here.<bt><br>" & olkReply.HTMLBody
        .Send
    End With
    Set olkReply = Nothing
End Sub

Remark: Since I posted this link, Experts Exchange has changed its business model and has become much less accessible. The code is however duplicated above, even if the link is unusable.

Related Question