I frequently send short PowerShell scripts in the body of Outlook messages. The spell checker makes the text look lousy. This tip will allow you to copy code from the PowerShell ISE (or other code editor) and insert it into an Outlook message with color intact and without spell checking:
- Create a new email. Set the format to HTML or Rich Text Format
- Go to “insert” tab, click “object” button (it’s on the right)
- Choose “OpenDocument Text” which will open a new embedded word document
- Copy and paste your code
An example will look like this:
This information is based on the instructions at: http://stackoverflow.com/questions/387453/how-do-you-display-code-snippets-in-ms-word-preserving-format-and-syntax-highlig