Using Code Samples in Word or Outlook

There are use cases when it’s nice to be able to include nicely formated code snippets as part of your emails or your word document. A great tool I use is https://tohtml.com/. Paste your source code in select the code type you wish to use, hit the Highlight button and now just hit the copy to clipboard and paste into your email or word doc.

In:

SELECT d.columnA,
d.columnB,
d.columnC,
d.columnD,
d.columnE
FROM [MyAwesomeDe] d
WHERE d.columnE = ‘Cake’

Output: