We help IT Professionals succeed at work.

how to make a shortcut to run Outlook Macro

mcoleson asked
I found how to create a macro to forward selected Outlook messages to a pre-defined recipient. (See the code snippet).

Now, I would like run the macro just by hitting a key combination (like Ctrl L) when the desired message(s) are selected.
How can I create a Shortcut to an Outlook macro?
thank you
Sub ForwardSelected()
    Dim intIndex As Integer, _
        olkMsg As Outlook.MailItem, _
        olkForward As Outlook.MailItem
    For intIndex = Application.ActiveExplorer.Selection.Count To 1 Step -1
        Set olkMsg = Application.ActiveExplorer.Selection.Item(intIndex)
        Set olkForward = olkMsg.Forward
        With olkForward
            'Change the email address on the following line
            .Recipients.Add "John@gov.org"
            Set .SaveSentMessageFolder = Session.GetDefaultFolder(olFolderDeletedItems)
        End With
End Sub

Open in new window

Watch Question

Ok... I think I have your solution!!!! Its not perfect - You need to use ALT + Shortcut Key instead of CTRL + Shortcut Key!

I am assuming that your macro security is appropriatly set.

In Outlook do the following;

1. Click on Tools > Customise
2. Select The Commands Tab
3. Select Rearrange Commands Button
4. Select Toolbar leave Standard as the selected Toolbar
5. Click on Add
6. Select Macros from the Category list
7. Select The Macro you want (which should already be there if you've created it already)
8. Click on OK
9. your Macro will be selected in the "controls" area on the left hand side of the Rearrange Commands dialog box. (You will also see it appear at the top of the screen on the menu bar)
10. Make sure its selected and then click on Modify Selection
11. Now all you have to do is give it a name. If you were to call your macro link "Macro 1" you can use the "1" as the launch link. Just enter the macro name as "Macro &1" You will see the 1 will be underlined, indicating it can be selected using ALT + 1.

As I said not exactly what you asked for (CTRL was required), but certainly a workable solution.

Make sure that the Assignment letter is not in use before starting this. Press ALT + (number or letter) if a menu opens or a dialog box appears it means the letter is not free. If you just get a beep - your good to go!

I hope this provides a solution to you.


This works very well. Now I either use the Alt+1 key, or just mouse click on the new menu item.
Very slick. Thank you.
Your Very Welcome!