in

Platinum Bay

Peace, Love, and...

This Blog

Syndication


.NETicated

Another VS Code test

I have done some more testing and this post has been modified to reflect changes: 

In an earlier post, I blogged about code formatting in Word 2007.  Since then, Andy has posted about using Windows LiveWriter.  So I download LW, and a couple add-ons and give it a whirl.  IMHO, it is not as feature rich as I would like; I was not impressed.  I continued searching and found Peter Gekko's post about CopySourceAsHtml.

Unfortunately, while close, every line is surrounded by a paragraph element, thereby destroying the layout.  And where there should be an empty line, it is also represented by a paragraph. I'll download the source and see if I can fix this. If so, then I can copy source from Visual Studio, paste it into Word 2007, and forget about it.

Updated: It seems that I was very mistaken.  The problem does not lie within the CopyCodeAsHtml add-in as I suggested.  I copied text within Visual Studio with CopyCodeAsHtml, pasted it into Expression Web, and was pleased with the results.  I then ran Microsoft Network Monitor 3.0 while posting a message, and it seems that Word 2007 is reformatting the <P Style="Margin: 0px;"> into <P style="BACKGROUND: white">.  I also found that there is a setting, "Wrap Words", which if turned off replaces the <P/> with a <pre/>.  But Word 2007 is also replacing the <pre/> tag with <p style="background:white;">.  So, Word 2007 seems to be the culprit, and I'm still searching for a resolution.

Published Apr 25 2007, 08:46 AM by Steve
Filed under: ,

Comments

No Comments

Leave a Comment

(required )  
(optional )
(required )  
Add

About Steve

Steve Andrews is an independent consultant, INETA speaker, and Microsoft MVP for Visual Studio ALM. He has been working in technology for over ten years focusing on custom application development and Application Lifecycle Management. Steve is also Microsoft and IBM certified and a community fanatic having led sessions at nearly 100 events across North America. When he's not developing software solutions or engaging with the community about software technology, Steve is a closet singer and songwriter and plays the guitar and keys. Occasionally, Steve even gets to sleep. Occasionally.
Powered by Community Server (Commercial Edition), by Telligent Systems
© Platinum Bay | Some Rights Reserved Creative Commons License

Disclaimer: The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or annonymous comments) - so keep it polite, please.