How to auto reply with original email message in Outlook?
Normally, when we create a rule to auto rely the email out of office, but the original message in body will not be included. How could you auto rely the emails with original message in Outlook? This article, I will talk about a VBA code to help you finishing this job as quickly as possible in Outlook.
Auto reply emails with original message in outlook with VBA code
Auto reply emails with original message in outlook with VBA code
The normal Outlook rule can not help you to deal with job, but, with the following VBA code, you can finish this quickly and easily. Please do as this:
1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, double click ThisOutlookSession from the Project1(VbaProject.OTM) pane to open the mode, and then copy and paste the following code into the blank module.
VBA code: Auto reply emails with original message:
Public WithEvents xlItems As Outlook.Items
Private Sub Application_Startup()
Set xlItems = Session.GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub xlItems_ItemAdd(ByVal objItem As Object)
Dim xlReply As MailItem
Dim xStr As String
If objItem.Class <> olMail Then Exit Sub
Set xlReply = objItem.Reply
With xlReply
xStr = "<p>" & "Hi, Your email has been received. Thank you!" & "</p>"
.HTMLBody = xStr & .HTMLBody
.Send
End With
End Sub
3. Then save and close the code window, close or restart the Outlook to make the VBA code take effect. Now, when you receive emails, Outlook will be send an auto reply with the original message as following screenshot shown:
Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!
- Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
- BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
- Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
- Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
- Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.







