All sorts of wrong quotation marks from M$ word

I was typing up a manual for a new design and used M$ word to type up example codes and I got this:

Serial.print(‘\f’); // Clear screen
Serial.println(“GPS Menu:”); // Display “GPS Menu” on line 1
Serial.println(“1.Display GPS info”); // Display option 1 on line 2
Serial.println(“2.Record GPS info”); // Display option 2 on line 3
Serial.print(“3.Show credit”); // Display option 3 on line 4

Arduino wouldn't compile. I looked again and again and found the weird quotation marks both single and double. No wonder arduino won't compile. So I did all the replacement and it compiled. I have written a few hundred lines in word so any quick way to change and or disable this feature? Thanks. My first response is replace but maybe I can turn it off so I don't have to do replace next time I type in M$ word.

To turn off the "feature" you need to change AutoFormat / Replace / "Straight quotes" with "smart quotes". In newer version of Word, the option is found...

• Start Word
• Click the round button in the upper-left corner
• Click Word Options in the lower-right corner
• Click Proofing in the left-side list
• Click the AutoCorrect Options button in the middle-top
• Navigate to the AutoFormat tab
• Under Replace, ensure "Straight quotes" with "smart quotes" is not checked
• Navigate to the AutoFormat As You Type tab
• Under Replace as you type, ensure "Straight quotes" with "smart quotes" is not checked
• Click OK
• Click OK

To change the quotes already in your document...

• Load your document
• Press Ctrl + F to open the Find dialog
• Navigate to the Replace tab
• For Find what type a quote character
• For Replace with type a quote character
• Click Replace All
• Click OK
• Click Close
• Relax and enjoy your improved document

Thank you Coding Badly! So here is a graphical solution for anyone that is annoyed by the same problem:

liudr, this is a case of using right tool for the right job.

Example code for manuals is must be edited in an IDE so you can check that the code compiles. ==> Word for prose, IDE for code.

From the IDE you can copy and paste it into Word AND in the zip file with all sources from the manual you want people to download from your website..

Have seen too much manuals/books/websites with code examples that did not compile :frowning:


Rob, agreed. I think I started typing up my manual in word and just went ahead and typed up some code as well. Next time I will use IDE. This was the first time I wrote a manual with a complete description of a unit, which I only wrote partial code. So the manual will act as a guide on what else I need to code in order to make it a complete product.