Ever wanted to copy paste some code from Visual Studio .NET 2003 to your blog tool (e.g. Sauce Reader) and keep the colorization ?
Here is the solution, CopySourceAsHtml, an awesome plugin from Colin Coller. The cool point is that if “VS.NET can highlight it, CSAH can copy it, and your code should look the same in your browser as it does in your editor“. I was a bit disappointed not finding the context menu in the editor for other source then C# but you might add a keyboard shortcups as described on this page.

Even better, Colin provides the source. I guess I will soon integrate his colorization way to Tech Head Brothers Word 2003 publishing tool.

Here a sample output of a C# code:

   39         #region GuiBuilder

   40  

   41         //http://support.microsoft.com/default.aspx?scid=kb;EN-US;303018

   42         private bool setupCommandBar()

   43         {

   44             ThisApplication.CustomizationContext = ThisDocument;

   45  

   46             // Add a button to the command bar.

   47  

   48             oCommandBar = ThisApplication.CommandBars.Add(“Tech Head Brothers“, oMissing, oMissing, true);

   49  

   50             AddButton(ref oCommandBar,

   51                       ref oButtonNew,

   52                       new _CommandBarButtonEvents_ClickEventHandler(oButtonNew_Click),

   53                       “New Document”,

   54                       12);

XSLT:

    1 xml version="1.0" encoding="ISO-8859-1" ?>

    2 <xsl:stylesheet xmlns:thb=”http://www.techheadbrothers.com/WordFormat30.xsd" xmlns:xsl=”http://www.w3.org/1999/XSL/Transform" version=”3.0”>

    3    <xsl:output method=”html” version=”4.0” encoding=”iso-8859-1” indent=”yes” />

    4  

    5    <xsl:param name=”readcounter” />