Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why, if I copy code from Visual Studio directly into Gmail, all styles are removed but if copied first to Word and then from Word into Gmail then all styles including fonts and color are kept?

share|improve this question

Gmail is aware of Word styles. Any styling on text copied from Word is pasted from the clipboard as either Word HTML or RTF if the destination application supports those formats (which Gmail's editor does). Visual Studio's styling isn't copied to the clipboard as Word HTML or RTF, so Gmail's editor will ignore the VS styling. However, Word is aware of VS styling and apparently can convert that styling to Word HTML or RTF when text is copied from VS to Word, copied from Word, then pasted to Gmail.

The best way I know to remove styling from any text is to paste whatever text you want to be plain into notepad, select it, copy it, and paste it again in your final destination.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .