document updated 10 years ago, on Dec 27, 2013
If you regularly receive unix commands that you need to copy-n-paste out of a Word document, then you should disable AutoFormat/AutoCorrect, because it is otherwise difficult to ensure that quote and dash characters aren't damaged.
how to prevent the problem from happening in the first place
- Word 2002, 2003, 2007, 2010, or 2013 — Ctrl+F for "version of Word" here
how to detect whether the problem occurred
In Word 2007:
- go to the "Home" ribbon, and click "Find"
- click the "More > >" button, and enable the "Use wildcards" option
- paste this into the search box:
- click Reading Highlight > Highlight All
how to fix a document where the problem has already occurred
If you have an existing document that already has damaged characters in it, you can change them back to the original characters using one of these macros:
- solutions based on AutoFormatAsYouTypeReplaceQuotes and AutoFormatAsYouTypeReplaceSymbols:
- solutions based on ChrW() to target specific Unicode characters: