Word Syntax Highlighting

3

0

I'm writing an article and I would to maintain notepad++ syntax highlight when I paste a code block into word. The code is all in SQL, and I would very much like to the way it is formatted.

Also, print-screen and cut/paste the images is NOT an option.

Any ideas?

George Silva

Posted 2010-07-28T18:01:07.960

Reputation: 135

Do not use the not-programming-related tag. If you feel the need to use it, your question does not belong here. If the question does belong here, then the tag isn't appropriate. – skaffman – 2010-07-28T19:09:40.523

Answers

4

http://jeez.eu/2009/09/09/great-and-necessary-plugins-for-notepad-plus-plus/

Check out the section on NppExport. Seems to be what you're looking for ("Copy as RTF")

Caladain

Posted 2010-07-28T18:01:07.960

Reputation:

worked like a charm! – George Silva – 2010-07-28T18:23:45.250

2

The link in the original answer does not work anymore, but the NppExport plugin can be found here: http://sourceforge.net/projects/npp-plugins/files/NppExport/

– quosoo – 2011-11-13T15:15:34.470

2

It happens to be the case that NppExport ships with notepad++. Check your Plugins -> NppExport menu for options to copy RTF snippets to the clipboard.

kbrimington

Posted 2010-07-28T18:01:07.960

Reputation: 143

1

Visual Studio, for C# code (so, and, I assume for SQL), will include HTML formatting when copy'n'pasting code into something which understands HTML.

James Curran

Posted 2010-07-28T18:01:07.960

Reputation: 171

Another option is to use a general-purpose syntax highlighter like Pygment or GeSHi to convert a piece of source code into HTML markup. Then you can similarly copy and paste the highlighted code into any type of word processor that understands HTML. – Lèse majesté – 2010-07-28T18:25:52.533