There's a nice add-in for Visual Studio called CopySourceAsHTML (for VS2005, VS2008), which I have been using for a while now. Turns out there was an earlier progenitor in htmlize.el for emacs.

Here's the result: