I want to insert some C/C++ source code into a Microsoft Word document. I have no problem in copying the code from source file and pasting into Word. I can do fixed-width. But, in Word, I see the code in black-and-white format; I loose the syntax highlighting as I get in the source code editor (for me, gvim). So, my question is, is there any way to do syntax highlighting of C/C++ source code in MS Word?
Remove highlighting from part or all of a document Select the text that you want to remove highlighting from, or press Ctrl+A to select all of the text. Go to Home and select the arrow next to Text Highlight Color. Select No Color.
Highlighting is formatting. When you start a new paragraph, by default it will continue in that paragraph. Start a new paragraph. Click in the left margin to select the entire paragraph.
Closing a document frees up more computer memory for other activities. Closing a document is different from exiting, or quitting, Word; after you close a document, Word is still running. You close a document by using the Close command on the File tab (New!), which keeps the Word program window open.
I've found a tool similar to this found by darlinton, but having several different styles of colouring: http://tohtml.com/. I hope it would help.
I found Notepad++ also can copy the code as .rtf file. Plugin/NppExport/Copy RTF to Clipboard, Then you can paste them into word with highlight and layout.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With