How to: C# source with syntax highlighting on PowerPoint slides
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?
- copy the code from Visual Studio to PowerPoint
- choose "keep original formatting" on the Paste Options icon
If I copy the code from Visual Studio directly into PowerPoint, using Paste Special (and picking RTF), it only does some of the formatting.
Here is how I got it to do all the formatting.
- Copy the code in Visual Studio. (Ctrl+C)
- Open a new Word document and do a paste. (Ctrl+V)
- Re-select the code in Word and copy it again. (Ctrl+A, Ctrl+C)
- In PowerPoint, do a Paste Special, as "HTML Format". (Ctrl+Alt+V)