Visual Studio copy/paste into Outlook with standard formatting?
Asked Answered
A

4

15

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...)

Assort answered 8/12, 2009 at 15:4 Comment(3)
Same problem now with VS 2012 dark themeIntemerate
Why don't Microsoft fix this?Folkestone
Still a problem in VS 2013. Here's the uservoice for this issue visualstudio.uservoice.com/forums/121579-visual-studio/…Arvo
E
9

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/

Explosion answered 17/5, 2013 at 12:12 Comment(0)
A
2

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!

Assort answered 16/12, 2009 at 0:38 Comment(3)
Sorry, I know it's been a long time. Could you please post the style you used to make it default VS style?Seriema
FYI for anyone reading this now... the CopySourceAsHtml add-in only supports up to Visual Studio 2008.Potomac
"Copy as HTML" (different tool, similar name) supports up to VS2012, which is a bit more helpfulUpbringing
H
1

This free VS Extension (named "Copy As HTML") allows you to choose the background color when copying to clipboard:

This is a lightweight tool that allows you to copy code from the Code Window and convert it into HTML while preserving syntax highlighting, indentation and background colour.

Heptamerous answered 15/8, 2014 at 17:11 Comment(1)
Sadly this doesn't support VS2013+ at this staageUpbringing
B
-2

This add-in adds a command to copy in plain text: VSHelper

Bluestone answered 8/12, 2009 at 15:48 Comment(1)
It is clearly stated in the question that he does not want to copy plain text.Heptamerous

© 2022 - 2024 — McMap. All rights reserved.