How to: C# source with syntax highlighting on PowerPoint slides

Viewed 60918

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?

8 Answers
  1. copy the code from Visual Studio to PowerPoint
  2. choose "keep original formatting" on the Paste Options icon

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

In Notepad++ 6.9.2 or higher, right click the text and select Plugin Commands and Copy Text with Syntax Highlighting.

I accept all of the answers above.

I have found a more presentable way of sharing the code in ppt, which will look elegant in presentation.

use https://carbon.now.sh/ which is free and open source, add your code, do customizations and then export it to add it in ppt.

enter image description here

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.

Related