I have to write technical documentation for the company I work and develop for and it has to be in Word 2010.
I do use Notepad++ extensively for other things, but my document must end up in Word.
So the question remains:
How can I copy VBA code from the VB Editor in either MS Excel or MS Access into a Word document and keep its full formatting (font and coloring)?
3+ years later, but here's my approach. The dinosaur in me sometimes still likes to work with pencil and ink on code printouts.
Copy the VBA, paste into a new file in Notepad++ aka NPP.
Change the language to VB (Alt-L for Language menu > V).
Use the NppExport plugin (part of the standard NPP install) to copy the RTF to the clipboard. Alt-P for Plugins menu, then arrow up or down to select NppExport, right arrow to choices, up or down arrow to Copy RTF to Clipboard.
Switch to Word, open a new file (I've made my own Word template that's got some formatting plus a small Word VBA procedure that selects everything and applies the font and size I want, Consolas 8pt), and paste.
I'd like to automate the NPP piece, but as it is, it takes just a few seconds per module, less time than it takes to retrieve the printout from the printer.