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:
Best Office Productivity Tools
Breaking News: Kutools for Outlook Launches Free Version!
Experience the all-new Kutools for Outlook FREE version with 70+ incredible features, yours to use FOREVER! Click to download now!
🤖 Kutools AI : Instant pro emails with AI magic--one-click to genius replies, perfect tone, multilingual mastery. Transform emailing effortlessly! ...
📧 Email Automation: Auto Reply (Available for POP and IMAP) / Schedule Send Emails / Auto CC/BCC by Rules When Sending Email / Auto Forward (Advanced Rules) / Auto Add Greeting / Automatically Split Multi-Recipient Emails into Individual Messages ...
📨 Email Management: Recall Emails / Block Scam Emails by Subjects and Others / Delete Duplicate Emails / Advanced Search / Consolidate Folders ...
📁 Attachments Pro: Batch Save / Batch Detach / Batch Compress / Auto Save / Auto Detach / Auto Compress ...
🌟 Interface Magic: 😊More Pretty and Cool Emojis / Remind you when important emails come / Minimize Outlook Instead of Closing ...
👍 One-click Wonders: Reply All with Incoming Attachments / Anti-Phishing Emails / 🕘Show Sender's Time Zone ...
👩🏼🤝👩🏻 Contacts & Calendar: Batch Add Contacts From Selected Emails / Split a Contact Group to Individual Groups / Remove Birthday Reminders ...
Instantly unlock Kutools for Outlook with a single click—permanently free. Don't wait, download now and boost your efficiency!
![kutools for outlook features1](http://cdn.extendoffice.com/images/stories/kto-ad-sun/kto19.0-kutools-100.png)
![kutools for outlook features2](http://cdn.extendoffice.com/images/stories/kto-ad-sun/kto19.0-plus-100.png)
![Raquel](http://cdn.extendoffice.com/media/com_easydiscuss/images/default_avatar.png)
![Raquel](http://cdn.extendoffice.com/media/com_easydiscuss/images/default_avatar.png)
![Damien Abbatecola](http://cdn.extendoffice.com/media/com_easydiscuss/images/default_avatar.png)
![skyyang](http://cdn.extendoffice.com/media/com_easydiscuss/images/default_avatar.png)
![Raven](http://cdn.extendoffice.com/media/com_easydiscuss/images/default_avatar.png)
![Josh](http://cdn.extendoffice.com/media/com_easydiscuss/images/default_avatar.png)
![Keith Nichols](http://cdn.extendoffice.com/media/com_easydiscuss/images/default_avatar.png)
![fitosolis](http://cdn.extendoffice.com/media/com_easydiscuss/images/default_avatar.png)