8.7 Blogging or Emailing Your Code in Style with the CopySourceAsHtml Visual Studio Add-in

Code is much easier to read when it includes syntax coloring and line numbers. This is one of the main benefits of using a good text editor or IDE when working with code. The problem is that when you email code snippets or post them to your weblog or web site, they are normally just displayed as regular text, which makes it much harder for your readers to read and understand the code.

CopySourceAsHtml is a Visual Studio add-in that gives you the ability to select your code in Visual Studio, then simply copy it to the clipboard as styled HTML. It doesn’t use a generic style; it actually reads the Visual Studio settings and creates the correct HTML based on those settings. Using CopySourceAsHtml to post code to your blog or web site or send it via email will make it much easier for your audience to read and understand that code.

CopySourceAsHtml at a Glance

Tool

CopySourceAsHtml

Version covered

2.0

Home page

http://www.jtleigh.com/people/colin/software/CopySourceAsHtml/

Power Tools page

http://www.windevpowertools.com/tools/138

Summary

Gets your code ready to post to a web site or blog

License type

Custom

Online resources

None

Supported Frameworks

Visual Studio 2005

Getting Started

To get started, download and install the .msi package from the tool’s home page. The install will add the add-in directly to Visual ...

Get Windows Developer Power Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.