CopySourceAsHtml
Brad Abrams, Jay Bazuzi, Roy Osherove, and what seems like the majority of .NET bloggers use Word, Word macros, or Visual Studio macros that use Word in some way to format their code. A few use Jean-Claude Manoli's CSharpFormat tool. Each solution has drawbacks (opening Word, opening another browser window, copying and pasting, extra steps, terrible HTML, etc), and formatting code is still painful, so I've written a simple Visual Studio add-in that allows you to copy source as HTML suitable for pasting into blogs:
Update: This version is no longer available for download. Download a newer version from this page.
After you install CopySourceAsHtml, "Copy Source As HTML..." will appear in the code window's context menu:

When you click "Copy Source As HTML...", you'll be asked for language and formatting preferences. "Language", "Number From", and "Tab Width" are taken from the document. "Line Numbers", "Alternate Line Background", and "Embed Stylesheet" are stored in the registry.

When you click "OK", the source will be formatted according to your preferences and copied to the clipboard, ready to be pasted into your blog.
CopySourceAsHtml extends CSharpFormat, and I'm grateful to Jean-Claude for his excellent work. If you find CopySourceAsHtml useful, find a bug, see room for improvement, or know of an existing add-in that provides the same functionality, please let me know.
Thanks,
Colin
04:40 PM | Colin

Comments
# RE: CopySourceAsHtml
Dude, this is awesome. Thanks for letting me know about it. I posted it on my blog to get the word out.
05:58 PM | Haacked
# RE: CopySourceAsHtml
p.s. my post suggests some improvements.
http://haacked.com/archive/2004/10/13/1344.aspx
05:58 PM | Haacked
# RE: CopySourceAsHtml
The only reason I couldn't use this is because it uses pre tags, that's a big advantage of the 'filtered word' approach, it uses lots of extra bits but does retain formatting without using pre tags - this is important if you're trying to retain page width for example...
07:21 AM | Scott Galloway
# RE: CopySourceAsHtml
It would be great if there was a way to assign a keystroke within VS.Net to automatically execute this with the default options...
02:52 PM | Eric
# RE: CopySourceAsHtml
Found you on Larkware. Very, very nice.
11:11 AM | AddOnUser
# RE: CopySourceAsHtml
I've updated CopySourceAsHtml since the last comment was posted. See:
http://www.jtleigh.com/people/colin/blog/archives/2004/10/copysourceashtm_1.html
06:55 PM | Colin
# RE: CopySourceAsHtml
Very useful. This little add-in is great because you can take care of your business within the IDE of Visual Studio. I love all the features that you have put into it.
07:25 PM | Lewis Moten
# RE: CopySourceAsHtml
Love it! Thanks
06:41 AM | Stephen
# RE: CopySourceAsHtml
What about support for VS2005?
10:32 AM | Keith Elder
# RE: CopySourceAsHtml
Does this work for Visual Studio 2005?
08:15 AM | Tim