Emulate Stack Overflow's inline code span formatting in Microsoft Outlook

3

4

Stack Overflow's inline code span formatting is a useful tool for communicating text that includes code snippets or keywords. I find it easier on the eyes than bold, _ underline _ or italics.

I would like to emulate this format when writing Microsoft Outlook emails.

I've played around with Outlook a bit, and have come up with a multi-step process:

1. Highlight text with light grey colour.

This would be easy to do with the highlight tool, except the highlight tool doesn't have a light enough grey colour for my liking (the grey that's available is so dark that it makes text hard to read).

Instead, I add a custom group tool to the ribbon:

  • Outlook OptionsQuick Access Toolbar
  • Choose commands from:All CommandsShading
  • Add >> to the Customize Quick Access Toolbar:
  • OK

The shading tool can be used similar to how you would use the highlight tool.

2. Change the font from the default to Consolas

3. Change the size from the default to 10

4. Pad the text with a space on each end.

  • This is a nice-to-have, but not necessary if impractical.

5. Use the Format Painter to apply the formatting to other text in the email.


While these steps work, they're rather inefficient compared to the various options in Stack Overflow.

Is there a more efficient way to do this in Microsoft Outlook emails?

Wilson

Posted 2017-03-29T19:11:35.800

Reputation: 91

Answers

1

It's a pretty dirty solution, but one idea is:

A. Put some dummy text in my email signature that has the formatting that I want:

B. Skip right to step #5; use the format painter to apply the formatting in the dummy text to the text in the email.

C. Delete the dummy text.

  • Or better yet, include the formatting as a legitimate part of my email signature, so it would be constantly available, and I wouldn't forget to delete the dummy text.

Unfortunately, padding the text with a space at each end is not done automatically (step #4). This isn't a deal-breaker though.

Wilson

Posted 2017-03-29T19:11:35.800

Reputation: 91

1

I wanted to do the same as you and my solution was to create a new style called "Code" with the following formatting:

Font: (Default) Consolas, 10 pt, Font color: Black
    Pattern: Clear (Custom Color(RGB(242,242,242))), Style: Linked, Quick Style
    Based on: Normal

The only downside I have with it is that when I highlight some text and apply the style then occasionally the font doesn't shrink to 10pt and stays at 11pt. When you're mixing this with 11pt Calibri then it's too big so you have to manually change the size.

Richard

Posted 2017-03-29T19:11:35.800

Reputation: 4 197

Looks like it. Although oddly enough I didn't use the Quick Style option, even though that appears in the format description. I just opened the Styles window and created a new style from there. – Richard – 2017-03-31T23:54:11.443