Shortcut or macro for changing font type in Microsoft Outlook
Is there a keyboard shortcut for changing the font in Outlook on Windows? I have to alternate between Calibri and Courier constantly for technical reasons and clicking on the font dialog every time gets very tedious. I know that I can use Ctrl+Space to change anything to the default (Calibri) font.
If there is no shortcut, could someone please help me create a macro to toggle fonts? I imagine I can assign any shortcut to a macro?
(The answer by techie007 didn't work for me in Outlook 2010)
This macro (adapted from http://www.slipstick.com/developer/word-macro-apply-formatting-outlook-email/) does:
Sub SetCodeFont()
Dim objItem As Object
Dim objInsp As Outlook.Inspector
Dim objWord As Word.Application
Dim objDoc As Word.Document
Dim objSel As Word.Selection
On Error Resume Next
Set objItem = Application.ActiveInspector.CurrentItem
If Not objItem Is Nothing Then
If objItem.Class = olMail Then
Set objInsp = objItem.GetInspector
If objInsp.EditorType = olEditorWord Then
Set objDoc = objInsp.WordEditor
Set objWord = objDoc.Application
Set objSel = objWord.Selection
objSel.Font.Name = "Consolas"
End If
End If
End If
Set objItem = Nothing
Set objWord = Nothing
Set objSel = Nothing
Set objInsp = Nothing
End Sub
Next, in the VBA Editor go to Tools > References
and select Microsoft Word 14.0 Object Library
.
Now, to create a keyboard shortcut for a macro, add it to your Quick Access Toolbar as follows:
- Open a new mail message
- Click on the small drop down arrow on the Quick Access Toolbar (typically located at the top of the window) and select "More Commands..."
- The Outlook Options dialog will open, then select "Macros" from the "Choose commands from:" dropdown
- Select the SetCodeFont macro from the list and press "Add >>"
- The macro button will now appear on the Quick Access Toolbar
To run the macro highlight some text in your email, and press Alt + <Num>
where <Num>
is the position of the macro in your Quick Access Toolbar. For example, if the macro is the first button on the toolbar, use Alt + 1
to invoke it.
Just FYI, this is the key sequence to focus the Font selector: Alt, H, F, F