• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Send a New Message when a Message Arrives

Slipstick Systems

› Outlook › Rules, Filters & Views › Send a New Message when a Message Arrives

Last reviewed on March 11, 2021     208 Comments

A security update disabled the Run a script option in the rules wizard in Outlook 2010 and all newer Outlook versions. See Run-a-Script Rules Missing in Outlook for more information and the registry key to fix restore it.

How to use a Run a Script rule to have Microsoft Outlook automatically send a new email message using a template, to a new email addresses when a message meeting specific conditions arrives. I also have a version of the script that sends a new message with the body of the message that triggered the rule to another person. (To avoid including the Reply header in the body).

To use, open the VBA Editor and paste the code into ThisOutlookSession. Create a Run a Script rule, selecting this rule.

When you create the template, do not include a signature. Outlook will add the signature when the message is sent. To test the rule without sending messages, change objMsg = Send to ojbMsg = Display. This will open the message form instead of sending it.

New message using a template

Sub SendNew(Item As Outlook.MailItem)
 
Dim objMsg As MailItem
Set objMsg = Application.CreateItemFromTemplate("C:\path\to\test-rule.oft")

' If the address you want to send to is not saved in the template, 
' set the addresses here
'objMsg.Recipients.Add "alias@domain.com"

objMsg.Send

End Sub

 

To reply to the sender using a template

This script could be used for an Out of Office style reply. Using this method will send a reply with every message that meets the condition of the rule.

Sub SendNew(Item As Outlook.MailItem)
 
Dim objMsg As MailItem
Set objMsg = Application.CreateItemFromTemplate("C:\path\to\test-rule.oft")

objMsg.Recipients.Add Item.SenderEmailAddress

' Copy the original message subject 
objMsg.Subject = "Attn: " & Item.Subject

objMsg.Send

End Sub

To Forward the message body to another address

This version of the script sends a new message containing the body of the received message. (If you want to forward the complete message, use the Forward rule.)

Hyperlinks links will be "opened". To avoid this, and if you don't mind converting the messages to HTML, you can use objMsg.HTMLBody = Item.HTMLBody instead (it works with plain text and RTF messages), or create an If Then statement to check for incoming body types and use the correct format. As always, test it with messages to yourself or using objMsg.Display before using it to send messages to others.

Sub SendNew(Item As Outlook.MailItem)
 
Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)

objMsg.Body = Item.Body
objMsg.Subject = "FW: " & Item.Subject
objMsg.Recipients.Add "alias@domain.com"

objMsg.Send

End Sub

More Information

More Run a Script Samples:
  • Autoaccept a Meeting Request using Rules
  • Automatically Add a Category to Accepted Meetings
  • Blocking Mail From New Top-Level Domains
  • Convert RTF Messages to Plain Text Format
  • Create a rule to delete mail after a number of days
  • Create a Task from an Email using a Rule
  • Create an Outlook Appointment from a Message
  • Create Appointment From Email Automatically
  • Delegates, Meeting Requests, and Rules
  • Delete attachments from messages
  • Forward meeting details to another address
  • How to Change the Font used for Outlook's RSS Feeds
  • How to Process Mail After Business Hours
  • Keep Canceled Meetings on Outlook's Calendar
  • Macro to Print Outlook email attachments as they arrive
  • Move messages CC'd to an address
  • Open All Hyperlinks in an Outlook Email Message
  • Outlook AutoReplies: One Script, Many Responses
  • Outlook's Rules and Alerts: Run a Script
  • Process messages received on a day of the week
  • Read Outlook Messages using Plain Text
  • Receive a Reminder When a Message Doesn't Arrive?
  • Run a script rule: Autoreply using a template
  • Run a script rule: Reply to a message
  • Run a Script Rule: Send a New Message when a Message Arrives
  • Run Rules Now using a Macro
  • Run-a-Script Rules Missing in Outlook
  • Save all incoming messages to the hard drive
  • Save and Rename Outlook Email Attachments
  • Save Attachments to the Hard Drive
  • Save Outlook Email as a PDF
  • Sort messages by Sender domain
  • Talking Reminders
  • To create a rule with wildcards
  • Use a Macro to Copy Data in an Email to Excel
  • Use a Rule to delete older messages as new ones arrive
  • Use a run a script rule to mark messages read
  • Use VBA to move messages with attachments
Send a New Message when a Message Arrives was last modified: March 11th, 2021 by Diane Poremsky

Related Posts:

  • Run a script rule: Autoreply using a template
  • Use this macro to send an attachment to email addresses in the To line
    VBA: No attachments to CC'd recipients
  • A simple run a rule script marks Outlook messages read when the messag
    Use a run a script rule to mark messages read
  • Run a script rule: Reply to a message

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
208 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

Kim
May 17, 2024 2:36 pm

Hi Diane,
I'm trying to find a way to send a new email (not forward, redirect, reply) or text when a new email arrives. Basically Sender A sends email to Recipient A. When Recipient A receives the email I then want a new email or SMS created that simply states "New email has arrived" and sent to Recipient B. The web rule to send text doesn't work for us since we must append special characters to the Subject or the message gets dropped. Any help is appreciated. Thanks.

0
0
Reply
Diane Poremsky
Author
Reply to  Kim
May 17, 2024 4:03 pm

Are you using classic Outlook? If yes, you can do this using a macro in a rule. If you use webmail, you cannot do this.

This should work in a rule -


Sub SendNew(Item As Outlook.MailItem)
 
Dim objMsg As MailItem
Set objMsg = Application.CreateItem(olMailItem)

objMsg.Body = "New email has arrived"
objMsg.Subject = Item.Subject & "special characters"
objMsg.Recipients.Add "RecipientB@domain.com"

objMsg.Send

End Sub

1
0
Reply
Dave
May 5, 2022 10:29 am

Hello.
On outlook 2010, I am trying to run different scrips from VBA modules based on different words in the subject of the email received. It seems that I cannot create more then one script and choose then in rules. Surely there must be way to do such action. Thanks in advance

0
0
Reply
Diane Poremsky
Author
Reply to  Dave
May 5, 2022 11:09 pm

You can use multiple scripts - one per rule though - unless you use a "stub" macro in the rule and hand off to other macros. You need to use If statements in the macro to do different things based on the words found.

0
0
Reply
Dave
Reply to  Diane Poremsky
May 19, 2022 8:47 pm

Hi Diane
Thanks so much for assistance and apologies for late reply. Dont have access to internet all the time.
Goal is to forward emails without 'FW' in subject line and forwarding header in the body of the email. I am using your code from above for that and it works great. The problem is as said earlier, based on the words in the subject line and sender, to trigger different rules and scripts with different receiver emails adress. I cannot workout how to solve that.
Once again thanks for assistance and this blog.

0
0
Reply
Diane Poremsky
Author
Reply to  Dave
May 19, 2022 11:23 pm

You would either use more rules or if statements within a macro. Multiple rules can use the same script - so if action is the same, separate rules might work better.

0
0
Reply
Naveed
October 21, 2018 4:14 am

Hi, I receive some emails with attachments everyday which can be opened only from my computer (sender has given me a digital certificate). I need to forward all these mails to one of my colleague. When I set a rule for autoforward, he receives the mail, but is not able to view the contents or attachments. But when I open the mail in my computer and forward, it works fine. Is there a way to autoforward these mails properly?

0
0
Reply
Santiago Correal
March 30, 2018 1:27 am

Hi,
I'm trying to foward an email automaticly when i receive it. However, I need to Bcc it to a list of contacts that are listed at the beginning of the email an then erase this contact list from the email before sending it..
Is that possible?

0
0
Reply
Diane Poremsky
Author
Reply to  Santiago Correal
April 3, 2018 1:05 am

Yes, it would be possible. Is the BCC list identified as such? There are different ways to grabbing the list... and the best way depends on how the list is entered.

0
0
Reply
Terence
July 30, 2017 9:27 pm

Hi,

I am trying to send a new message, when a new message arrives, as per the code above.

And it works beautifully, thank you very much.

but i have 2 problems
1) the message i receive, includes images, and the ones i sent using the script, only have placeholders in the original images places.
2) the message body i sent is long, and my outlook signature appears beside (like in a table) the original body.

Can anyone help me with this 2 small issues please?

0
0
Reply
Diane Poremsky
Author
Reply to  Terence
August 2, 2017 12:51 am

#1 is difficult to fix - the embedded images are identified by a CID, forwarding breaks it. Forwarding it as attachment would work, but then it's an attachment...

#2: Which script are you using? You may need to add some line breaks or something to add space after the signature.

0
0
Reply
Kristy Thompson
July 18, 2017 1:11 pm

Hello, I am new to this as well, and I am needing to forward the original email with any attachments, and include a simple instruction statement with it. Such as "process on account xxxx".

0
0
Reply
Diane Poremsky
Author
Reply to  Kristy Thompson
July 18, 2017 10:51 pm

The macro at https://www.slipstick.com/outlook/rules/run-script-rule-reply-message/ shows how to do it - change.reply to .forward to use it to forward mail.

0
0
Reply
Jeremy Johnons
July 3, 2017 3:15 pm

Is it possible to auto send an email to an email address within the original email. For instance, someone fills out an online fors, I get an emailed notification telling me their infor from the form. Can I set up an automatic email that sends to the email address within the notification email?

0
0
Reply
Diane Poremsky
Author
Reply to  Jeremy Johnons
July 4, 2017 2:26 pm

Yes, if you use a macro to grab the address. See https://www.slipstick.com/developer/run-a-script-rule-autoreply-using-a-template/ for a sample.

1
0
Reply
anisha
February 8, 2017 6:36 pm

hi can I also send the outlook emails dynamically to excel/word or CSV. In detail Whenever I receive a mail in a particular folder the email should be also exported to an external document like excel/csv/word real time

0
0
Reply
Diane Poremsky
Author
Reply to  anisha
May 30, 2017 1:10 pm

You can. This shows how to send to excel - the macro at the end is an items add macro and can be tweaked to work in a run a script rule.
https://www.slipstick.com/developer/code-samples/macro-export-outlook-fields-excel/

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 30 Issue 29

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Jetpack plugin with Stats module needs to be enabled.
  • Move Deleted Items to Another Folder Automatically
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
  • New Outlook: Show To, CC, BCC in Replies
  • Insert Word Document into Email using VBA
  • Delete Empty Folders using PowerShell
  • Warn Before Deleting a Contact
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Move Deleted Items to Another Folder Automatically

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

New Outlook: Show To, CC, BCC in Replies

Insert Word Document into Email using VBA

Delete Empty Folders using PowerShell

Warn Before Deleting a Contact

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

VBA Basics

How to use the VBA Editor

Work with open item or selected item

Working with All Items in a Folder or Selected Items

VBA and non-default Outlook Folders

Backup and save your Outlook VBA macros

Get text using Left, Right, Mid, Len, InStr

Using Arrays in Outlook macros

Use RegEx to extract message text

Paste clipboard contents

Windows Folder Picker

Custom Forms

Designing Microsoft Outlook Forms

Set a custom form as default

Developer Resources

Developer Resources

Developer Tools

VBOffice.net samples

SlovakTech.com

Outlook MVP David Lee

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

:wpds_smile::wpds_grin::wpds_wink::wpds_mrgreen::wpds_neutral::wpds_twisted::wpds_arrow::wpds_shock::wpds_unamused::wpds_cool::wpds_evil::wpds_oops::wpds_razz::wpds_roll::wpds_cry::wpds_eek::wpds_lol::wpds_mad::wpds_sad::wpds_exclamation::wpds_question::wpds_idea::wpds_hmm::wpds_beg::wpds_whew::wpds_chuckle::wpds_silly::wpds_envy::wpds_shutmouth:
wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment