Tips for automating repetitive tasks in Outlook using macros
If you use Outlook every day, you may want to consider automating some of your tasks. Learn what macros are and how you can use them and set them up in Outlook to speed up your day-to-day tasks.

What are macros in Outlook?
Macros are lines of code that you can add to Outlook. These snippets of code allow you automate your emails, and therefore can help speed up the time that it takes to send messages. There are many ways that you can use macros. For example, you can create an Outlook macro that automatically contains a greeting and closing message to all your emails. Or you can use Outlook macros to automate entire messages. You can also use macros to automatically attach files to your email.


Your Outlook can change everything
Spend less time organizing your life and more time enjoying it with Outlook
Learn moreHow to set up Outlook macros
To get started on Outlook automation, you’ll need to add the Developer tab to your Outlook ribbon. To add the Developer tab:
- Right-click the ribbon.
- Select Customize the Ribbon.
- Check the box that says Developer and then click OK.
The Developer tab should now appear in the ribbon. Next, you’ll need to add the macro code to Outlook. To add a macro, you’ll need to have a basic knowledge of coding, although you can find macro templates online that you can copy and paste into Outlook.
To add your first macro to Outlook:
- Click the Developer tab.
- Select Visual Basic. A new window will open.
- On the left-hand side, click ThisOutlookSession.
- Under the Insert tab, click Module.
- Enter your macro code in the white window.
Here’s an example of what a macro code in Outlook might look like. This code lets you automate an entire email:
Sub SendMail()
Dim MyEmail As MailItem
Set MyEmail = Application.CreateItem(olMailItem)
With MyEmail
.To = “
.Importance = olImportanceHigh
.Subject = “
.Body = “
.BodyFormat = olFormatHTML
.Display
End With
‘MyEmail.Send’
End Sub
To test out your macro and see what your Outlook automation will look like, press the green play button.
Creating a shortcut for your macro
Create a shortcut for your macro so you can easily access them in the future. To create a macro shortcut:
- Open the Quick Access Toolbar at the top of Outlook.
- Click More Commands.
- Under the Choose commands from dropdown, select Macros.
- Select the macro that you want as a shortcut, then click the Add button.
- Click OK.
- Your macro shortcut will appear next to the Quick Access Toolbar.
If you ever want to remove this shortcut from the toolbar, simply right-click it and select Remove from Quick Access Toolbar.
Here’s another way you can find your existing macros:
- Click the Developer tab.
- Click Macros.
- Select the macro that you want to use.
How to edit your macro settings
To change or edit your Outlook macro settings:
- Click the Developer tab.
- Click Macro security.
From here, you have the option to:
- Disable all macros without notification
- Enable notifications for digitally signed macros and disable all other macros
- Turn on notifications for all macros
- Enable all macros (not recommended)
- Apply macro security settings to installed add-ins
Automating Outlook with macros can make managing your email easier. If you want to learn more ways you can simplify your Outlook experience, get tips on how you can harness the power of email filters.
Achieve the extraordinary with Microsoft 365
The powerful productivity apps and creativity tools in Microsoft 365 just got better. Work, play, and create better than ever before with the apps you love and Microsoft Copilot by your side.
Try for free