Tuesday, October 27, 2009

Syntax highlighting in Microsoft Office Word

To paste highlighted code syntax in Word, just use Notepad++

1. Open Notepad++ and load your source file.  Then select your language from the Language menu:



2. Once your code's syntax is highlighted, go to the plugins menu, choose the NppExport plugin and click on 'Export to RTF':



3. Then your source file will be exported to .rtf format and when you open that in Microsoft Office Word, you will see that your syntax is highlighted.  then obviously copy and paste that source.