Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

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

share|improve this answer
1  
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
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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