Is there a way to take C# code from Visual Studio and have it display with code highlighting?

When I copy and paste it makes each line a bullet point and it looks terrible.

Is there "Code Text Box" or something that someone has made?


You are almost there ;-)

  1. Copy cour code from VS
  2. Chose the "keep original formating" feature at Paste Options.

Now you should see your code with syntax highlighting.

To remove the bullet points, mark the text you want to change, go to the formating options and click on the "list" button. That should remove the bullet point for every marked line.

edit: forgot about the source. Found it here at Stackoverflow ;-)

  • 2
    He also complained about the bullet points. You could add a bit on how to remove them. – Daniel Beck Sep 22 '10 at 16:32
  • Thanks Diskilla! For the less observant (like me) after you paste and then click in your paste area, there will be a little clipboard looking icon at the end of what you pasted. That is where you select "keep orginal formatting". (It took me a bit to figure out where the "Paste Options" were.) – Vaccano Sep 22 '10 at 16:46
  • After testing it, this works only kinda. The coloring gets confused. (Some coloring states don't get closed off and so they color the code after it too). Copying into word and then into Powerpoint seems to make it work though. – Vaccano Sep 22 '10 at 16:54

Powerpoint Code Fromatting Addin was a good addin for syntax highlighting in Powerpoint 2007 and it supports a lot of languages.

Unfortunately, it doesnt install on latest Office 2013 version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.