views:

1258

answers:

4

I would like to show some C# source code in a PowerPoint presentation. But how can I copy the code including the syntax highlighting onto the slides? I could make screenshots, but that has some drawbacks (ugly, font size, unmaintainable). Do you have some ideas?

+12  A: 
  1. copy the code from Visual Studio to PowerPoint
  2. choose "keep original formatting" on the Paste Options icon
sblom
Embarassingly I totally missed that feature... ;) Unfortunately, however, the code is randomly colored and needs to be fixed with a load of extra work.
For some reason I only have the option to paste RTF or unformatted. RTF does not preserve black text.
Rick Minerich
Oh my god... any idea how many times I've looked for a way to do this!
WaldenL
A: 

This page shows you how to do it via Scite.

Andy
+1  A: 

You can use Windows Live Writer with the Insert Code plugin to "write" the C# code and syntax highlight it. This should be copy and pastable directly into PowerPoint, since it's inlines all of the syntax highlighting using styling elements.

Reed Copsey
+2  A: 

"Paste Special" (Ctrl+Alt+v) will do it. This option is available in different places depending on your version of PowerPoint.

Ishmael
Unfortunately, this doesn't work at all, at least not in the ordinary text boxes. BTW, we are using Office 2003. Maybe this is new in the 2007 version?
Yes, sorry it is.
Ishmael