How to Auto Forward Specific Incoming Emails with Custom Subject & Body in Outlook

To auto forward specific incoming emails, you’ll first think of using rules in Outlook. Yet, rule doesn’t support you to customize email subject and body when forwarding. If you want to auto forward specific emails with custom subject and body, you can use the method introduced in this article.

As we all know, Outlook rules can support users to automatically forward specific incoming emails. By that means, the email will be auto forwarded to the specific persons with the subject in pattern of “FW: original mail subject” and the original mail body. However, many users hope to auto forward emails with custom subject and body. Apparently, rules cannot realize it. Therefore, here we will introduce an approach to get it with ease.

Auto Forward Specific Incoming Emails with Custom Subject & Body

  1. At the very outset, start your Outlook program.
  2. Then, get access to VBA editor with reference to “How to Run VBA Code in Your Outlook“.
  3. Next, copy and paste the following VBA code into the “ThisOutlookSession” project.
Public WithEvents objInbox As Outlook.Folder
Public WithEvents objInboxItems As Outlook.Items

Private Sub Application_Startup()
    Set objInbox = Outlook.Application.Session.GetDefaultFolder(olFolderInbox)
    Set objInboxItems = objInbox.Items
End Sub

Private Sub objInboxItems_ItemAdd(ByVal Item As Object)
    Dim objMail As Outlook.MailItem
    Dim objForward As Outlook.MailItem
 
    If TypeOf Item Is MailItem Then
       Set objMail = Item
 
       'If it is a specific new email
       If (objMail.SenderEmailAddress = "bob_black@datanumen.com") And (objMail.Importance = olImportanceHigh) And (objMail.Attachments.Count > 0) Then
 
           Set objForward = objMail.Forward
           'Customize the forward subject, body and recipients
           With objForward
                .Subject = "Custom Subject"
                .HTMLBody = "<HTML><BODY>Type body here. </BODY></HTML>" & objForward.HTMLBody
                .Recipients.Add ("boss@datanumen.com")
                .Recipients.Add ("john@datanumen.com")
                .Recipients.ResolveAll
                .Importance = olImportanceHigh
                .Send
           End With
       End If
    End If
End Sub

VBA Code - Auto Forward Specific Incoming Emails with Custom Subject & Body

  1. After that, change the criteria of specified incoming emails. And modify the specific body, subject and recipients in the code as per your needs.
  2. Eventually, click into “Application_Startup” subroutine and press “F5” key.
  3. Since then, every time when a specific incoming arrives in your default Inbox folder, Outlook will automatically forward it with custom subject and body to the predefined recipients.Auto Forward Emails

Address Outlook Issues Flexibly

Although Outlook is feature rich, it is unable to be immune from errors and other problems. For example, Outlook PST file can be corrupted easily due to multiple factors. These include human errors, viruses, oversized PST file and damaged Outlook profiles and so on. Thereby, you need to make some precautions, such as keeping cautious of Outlook PST file size, keeping all viruses at bay as well as getting hold of a robust Outlook recovery tool, such as DataNumen Outlook Repair.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including SQL Server recovery and outlook repair software products. For more information visit www.datanumen.com

One response to “How to Auto Forward Specific Incoming Emails with Custom Subject & Body in Outlook”

Leave a Reply

Your email address will not be published. Required fields are marked *