I'm writing some documentation that will occasionally include C# or C++ code snippets.
In Visual Studio, the Edit/Copy command includes syntax coloring. You can see this if you paste the text into, e.g., Word or Outlook. In fact, if you use the "Paste Special..." command, you can see that it's "Rich Text (RTF)".
However, when pasting this text into an HTML file in Visual Studio, none of the colouring (or even formatting) is preserved.
Any ideas? I'm looking specifically for something that works locally (preferably in Visual Studio), not JavaScript-based solutions (such as SyntaxHighlighter).