Is there a way, in Microsoft Word 2007, to set up a style that will highlight VB.NET keywords, just like the Visual Studio IDE does?
A:
Not easily. What are you trying to accomplish? There are several tools that will generate highlighted HTML or images of your code for use in presentations. (I hope you're not trying to use MS Word as an IDE!)
Eli
2009-07-01 18:25:27
no no! I wrote a user manual to a program I wrote. I wanted to include some samples in my manual, but I didn't want to have to manually highlight every keyword manually
icemanind
2009-07-01 18:29:10
Yes. It should automatically keep the formatting for you. (I think you need at least VS2005 - not sure)
GalacticCowboy
2009-07-01 18:36:42
+2
A:
Use SciTE to edit your code samples, then use its "Edit / Copy as RTF" command to copy them into Word complete with syntax highlighting.
RichieHindle
2009-07-01 18:31:36
+1
A:
I don't know what it would look like, but I bet you could just make a new style, apply it to the code samples, and iterate through the blocks of text with the style in a macro and do code highlighting in the Macro.
But that's a lot of work, and as others have said, you can copy/paste from a few IDEs and paste syntactically styled code.
Tom Ritter
2009-07-01 18:35:55