CopySourceAsHtml (Updated)
I've released CopySourceAsHtml version 1.2.4.
CopySourceAsHtml 1.2.4 Installer (280 KB) (built and tested on VS.NET 2003)
CopySourceAsHtml 1.2.4 Source (38 KB)
CSAH 1.2.4 allows you to copy single-byte, double-byte, and Unicode characters from VS.NET. Previous versions only allowed you to copy single-byte and Unicode characters, and converted multi-byte characters to question marks. The new version should work properly for any DBCS codepage. Much of the credit for the new version goes to Qingbo Zhou for his suggestions, help debugging, and testing.
07:52 AM | Colin

Comments
# RE: CopySourceAsHtml (Updated)
Do you by any chance have a vs2005 beta 2 of this? Also, does it use style sheets, or just does the htm directly?
11:49 AM | pkellner
# RE: CopySourceAsHtml (Updated)
Peter: I'm planning to release CSAH 1.2.4 for VS.NET 2005 next week. CSAH 1.2.4 supports both inline styles (<p style="...">) and internal stylesheets (<style>) but not external stylesheets.
11:57 AM | Colin
# RE: CopySourceAsHtml (Updated)
for some reason, I'm getting this exception when I use "Copy as HTML..." from the right click menu in CopySourceAsHtml 1.2.4:
---------------------------
Error
---------------------------
CopySourceAsHtml caught the following exception:
System.Runtime.InteropServices.ExternalException: The requested clipboard operation failed.
at System.Windows.Forms.Clipboard.SetDataObject(Object data, Boolean copy)
at JTLeigh.Tools.CopySourceAsHtml.Clipboard.SetHtml(String html)
at JTLeigh.Tools.CopySourceAsHtml.Connect._Copy(Boolean now)
---------------------------
OK
---------------------------
11:49 AM | Jeff Atwood
# RE: CopySourceAsHtml (Updated)
Hmm. Now it's magically working. Maybe something had the clipboard locked; I've seen MS Word do that before. :P
11:56 AM | Jeff Atwood
# RE: CopySourceAsHtml (Updated)
Let me guess, you're using it under VPC, right? I've been meaning to fix that bug for even longer than I've been meaning to make a VS.NET 2005 version.
12:51 PM | Colin
# RE: CopySourceAsHtml (Updated)
any chance we're going to get CopySourceAsHTML for VS2005? You can see from all the screen shots of code, in my blog, that i desperately need it. :)
08:51 PM | Derick Bailey
# RE: CopySourceAsHtml (Updated)
hey Collin - I spent a few hours today learning the major differences between VS2003 and VS2005 plugins, and I've successfully ported CSAH over to VS2005 (though I have not created an installer yet). send me an email (remove the "NOSPAMME"), and i'll package it up into a .zip file for ya.
some of the code is a bit hackish, truthfully. i'm a VB.NET developer, and this is the first c# app that i've actually modified and compiled (i've known how to read c# for the 4 years it's been out, but have never needed to use it for an app)... I'll try to clean it up a bit before i send it to you... should be pretty easy.
09:15 PM | Derick Bailey
# RE: CopySourceAsHtml (Updated)
Any chance of an official VS2005 release?
01:02 PM | SureShot
# RE: CopySourceAsHtml (Updated)
How is it coming with that VS2005 version?
11:20 AM | Thomas Moore
# RE: CopySourceAsHtml (Updated)
Dear All
Here is what I had to do to get Colin's very useful addin to work with VS 2005.
- edit connect.cs as follows
- add a reference to Microsoft.VisualStudio.CommandBars.dll
- replace "using Microsoft.Office.Core;" with "using Microsoft.VisualStudio.CommandBars;"
- Cast all expressions such as (CommandBars) _application.CommandBars )["Edit"]
- Rebuild
- Copy the addins registry entries into VS2005.
sth like :
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Addins\CopySourceAsHtml.Connect]
"CommandLineSafe"=dword:00000000
"CommandPreload"=dword:00000001
"LoadBehavior"=dword:00000003
"FriendlyName"="CopySourceAsHtml"
"Description"="CopySourceAsHtml"
Hope this helps beginners (like me ;-)
Alain
03:59 PM | Alain Pannetier
# RE: CopySourceAsHtml (Updated)
I keep getting the same System.Runtime.InteropServices.ExternalException
as mentioned in the comments above, and yes I am using from a VPC.
Being that many people develop on VPC's nowadays have you been anble to fix this issue for VS2005?
09:44 AM | Jezz Santos