Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Jul 28 '10 at 19:49

This question came from our site for professional and enthusiast programmers.

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 Jul 28 '10 at 19:09

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

share|improve this answer
worked like a charm! – George Jul 28 '10 at 18:23
The link in the original answer does not work anymore, but the NppExport plugin can be found here: – quosoo Nov 13 '11 at 15:15

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.

share|improve this answer

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.

share|improve this answer
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é Jul 28 '10 at 18:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.