Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio copy/paste into Outlook with standard formatting?

I have custom settings in Visual Studio that include a dark background. Copy/pasting to Outlook produces a crime against eyeballs with a dark background in code on a white background of the mail.

Does anyone have any ideas of how I can paste code in standard VS formatting (NOT unformatted text from paste special, and not paste with my custom VS formatting)?

(Alternatively, does anyone know a quick way to switch between themes in VS? Thinking that could also work...)

like image 607
Mark Gibaud Avatar asked Dec 08 '09 15:12

Mark Gibaud


2 Answers

The following blog post details how to address this issue in VS2012:

http://codinglifestyle.wordpress.com/2013/05/17/copy-and-paste-formatting-with-visual-studios-dark-theme/

like image 135
codinglifestyle Avatar answered Oct 06 '22 17:10

codinglifestyle


Ok so the closest I got was using CopySourceAsHtml which also allows you to define custom css styles for that copied html. I peeked at the css styles when copying code from the default VS theme and copied them over.

Got me 90% there which is good enough - no black code backgrounds on white email backgrounds!

like image 24
Mark Gibaud Avatar answered Oct 06 '22 15:10

Mark Gibaud