Add text to auto-forwarded e-mail

Not open for further replies.


New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server

I've seen variations of this question floating around all over, but I have not managed to figure out how to adapt any of them to this specific need. Probably because the first time I even opened VB was yesterday haha.

So the issue I'm having:
At the moment I have a rule in Outlook to auto-forward e-mails from a specific sender that contain specific words in the e-mail body to one or multiple recipients. What I would like to do, is to add some text in the forwarded e-mail body, i.e "Please find the approval below".. As I understand then this should be doable using VB in Outlook, but I simply cannot wrap my three brain cells around it. Any help/ideas would be much appreciated!


New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Hi, Diane!

Thanks for the hint - I tried to use it, and upon execution, it tried to forward all of my existing emails which means I'm doing something wrong hahaha.

I'd need this macro to pick up only e-mails that meet specific criteria combination: sender, keyword, subject & then trigger the forward with a message & attachment added to the forwarded e-mail body. It seems that this would require to have a combination of codes?


New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Hi, in case anyone ever should possibly need such a solution, here's the code that eventually worked for me:

Public Sub CreateCustomMail(item As Outlook.MailItem)
' Define new email object and variables
Dim NewEmail As Outlook.MailItem
Dim eRecipientsLV As String
Dim eRecipientsLT As String
Dim eRecipientsEE As String
Dim eBody As String

' Set values
Set NewEmail = item.Forward
' ## Change the eRecipients value to the name of your Contact Group
eRecipientsLV = "RecipientsLV"
'eRecipientsLT = "RecipientsLT"
'eRecipientsEE = "RecipientsEE"
' ## Change the addToBody value to change the text in your forwarded mail.
' ## NOTE: This is HTML formatted text
addToBody = "Hello, <p><p>please see for approval,<p><p><br>Zelatvian"

' incoming email attributes converted to string for string comparisson
Dim mailSubject As String
mailSubject = item.Subject

' Format and forward actual email
With NewEmail
If InStr(mailSubject, "LV") > 0 Then
.Recipients.Add (eRecipientsLV)
End If
If InStr(mailSubject, "LT") > 0 Then
.Recipients.Add (eRecipientsLT)
End If
If InStr(mailSubject, "EE") > 0 Then
.Recipients.Add (eRecipientsEE)
End If
.Subject = "RE: " & item.Subject
.BodyFormat = olFormatHTML
.HTMLBody = addToBody & .HTMLBody
End With

Set item = Nothing
Set NewEmail = Nothing
End Sub


Senior Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Try my code. It worked fine for me using <Alt-F8> to launch the macro. Of course, I placed the macro in the ThisOutlookSession module. I tested this on several messages that had the text and one or more inline image(s), as well as some that had an attachment too. If the original has LOTS of linked inline images, be patient, as it can take a while to retrieve all of the original linked images from their server. However, embedded images should load more quickly.

Once you're comfortable with the macro, you can get rid of the . Display line and/or un-comment the .Save and .Send lines if you desire. If you assign it to your button and/or custom keyboard shortcut, the forward will be very automated.

Sub ForwardEmail()

Dim oExplorer As Outlook.Explorer
Dim oMail As MailItem
Set oExplorer = Application.ActiveExplorer
Set oMail = oExplorer.Selection.Item(1).Forward

On Error GoTo Release

If oExplorer.Selection.Item(1).Class = olMail Then
oMail.Subject = "FW: Personalized Subject Line"
oMail.HTMLBody = "Custom Text.<p> <img src=""custom image link""" _
& " title=""D"" alt=""D"" name=""D"" border=""0"" id=""D""/>" _
& vbCrLf & oMail.HTMLBody

oMail.Recipients.Add ""
If oMail.Recipients.Item(1).Resolved Then
' oMail.Save
' oMail.Send
MsgBox "Could not resolve " & oMail.Recipients.Item(1).address
End If
MsgBox ("Not a mail item")
End If
Set oMail = Nothing
Set oExplorer = Nothing
End Sub

Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
O Outlook tasks - Add text column with multiple lines Using Outlook 3
B Add Prefix text to Subject Line Using Outlook 1
e_a_g_l_e_p_i Is there a way to add something that is in the "Format Text" tab to the "basic Text" on the message tab Using Outlook 1
Tanja Östrand Outlook 2016 - Create Macro button to add text in Subject Outlook VBA and Custom Forms 1
V Need to add some text in subject while creating new mails - NEED VB CODINGS Using Outlook 4
L Outlook 2007 Macro to Add Text to a Contact Field Using Outlook 10
F VBScript to add pre defined text Using Outlook 5
S Prompt to add for text to existing subject line before sending. Using Outlook 9
E Macro to add text to a Message Outlook VBA and Custom Forms 3
K 2003 Outlook Contacts - how do I add text to multiple contacts .... Outlook VBA and Custom Forms 2
U Outlook: Add memo text Outlook VBA and Custom Forms 4
A "Get Add-Ins" - Which Version of Outlook to use Using Outlook 1
D Do I need Exchange Add-In? Using Outlook 6
C-S-R Manage Add-ins (Remove Wunderlist) Using Outlook 3
A iCloud add in problems Using Outlook 4
L Macro to add Date & Time etc to "drag to save" e-mails Outlook VBA and Custom Forms 8
C Looking for feedback on new Outlook Add-in Using Outlook 0
L isn't there an OL add-on that flags addressee before sending Using Outlook 3
S Add VBA save code Using Outlook 0
P Shortcut Pane - add shortcut to Office365 group mailbox Using Outlook 1
B Add ComboBox Value to Body of Email Outlook VBA and Custom Forms 1
G How to add a folder shortcut to outlook quick access toolbar? Using Outlook 6
G Add to Outlook Contacts - Point to non-default contacts folder Using Outlook 0
M Automatically add senders first name to a greeting Outlook VBA and Custom Forms 1
C Add Form to Appointments Received, Automatically Outlook VBA and Custom Forms 6
W April 2020 Office 365 Update - Add-Ons fail after Office 365 Update Using Outlook 6
B Task Filter Not Working When I add too many criteria Using Outlook 0
D Add date next to day name in Outlook Today calendar view Using Outlook 1
D iCloud Add-in not working in Outlook 2013 and Outlook 2016 After Windows Upgrade & iCloud Upgrade Using Outlook 2
P Add Paste Unformatted to QAT Using Outlook 1
M Ignore slow add-ins Using Outlook 0
Jennifer Murphy Add birthdays to calendar Using Outlook 7
P Add, remove, & reorder folder pane Using Outlook 6
L Tired of Outlook disabling Adobe PDF Creator add-in Using Outlook 1
R Add 'Company' to Select Names Form Using Outlook 1
A Outlook 2016 Web add-in missing on some machines Using Outlook 9
P Syncing problems with add-ins Using Outlook 3
Mark Foley Cannot enable add-in in outlook 2010 Using Outlook 0
BretAB Is it possible to add a lookup field to a Message form? Outlook VBA and Custom Forms 4
J Add an Attachment Using an Array and Match first 17 Letters to Matching Template .oft to Send eMail Outlook VBA and Custom Forms 2
iwshim outlook 2013 - I cannot see the "Manage Add-ins" Using Outlook 2
A Add multiple servers "on behalf of" email to "safe senders" list. Using Outlook 1
S Add Exchange Account as Secondary to Existing PST? Exchange Server Administration 1
C Macro to add multiple recipients to message Outlook VBA and Custom Forms 3
A Add to Outlook Contacts from email - default view Outlook VBA and Custom Forms 1
P Add a contact to the New Task in Outlook 2016 Using Outlook 2
B When working on emails in a certain folder, when I hit reply or reply all, I would like it re always reply all and add an email address to send to Outlook VBA and Custom Forms 3
M Macro to add date/time stamp to subject Outlook VBA and Custom Forms 4
O Outlook on Android - add BCC Using Outlook 2
J Execute Add-In Button from VBA Outlook 2016 Outlook VBA and Custom Forms 1

Similar threads