A practical guide. C # source with syntax highlighting on PowerPoint slides

I want to show some C # source code in a PowerPoint presentation. But how can I copy the code , including syntax highlighting on slides? I could take screenshots, but it has some disadvantages (ugly, font size, heavy). Do you have any ideas?

+41
c # syntax-highlighting powerpoint
May 05 '09 at 3:13
source share
7 answers
  • copy code from Visual Studio to PowerPoint
  • select "keep original formatting" on the "Insert Options" icon
+39
May 05 '09 at
source share

If I copy the code from Visual Studio directly to PowerPoint using the Paste Special (and selecting RTF), it only does some formatting.
This is how I got it for formatting.

  • Copy the code in Visual Studio. ( Ctrl + C )
  • Open a new Word document and paste. ( Ctrl + V )
  • Re-select the code in Word and copy it again. ( Ctrl + A , Ctrl + C )
  • In PowerPoint, click the special "Insert" tab as "HTML format." ( Ctrl + Alt + V )
+21
Aug 09 '11 at 16:57
source share

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

+11
May 05 '09 at 3:22 p.m.
source share
  • in PPT, click "Insert" → "Object" → "Create New" → "Microsoft Word Document"
  • Copy your code into the newly created object in the PPT slides,
  • Now you will see the formatting and highlight.
+4
May 18 '12 at 2:47
source share

You can use the Windows Live Writer with the Insert Code plugin to "write" C # code and syntax to highlight it. This must be copied and accessible in PowerPoint, as it includes all syntax highlighting using style elements.

+1
May 05 '09 at 3:20 p.m.
source share

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

+1
Oct. 25 '16 at 11:48
source share

Copy and paste the code into WordPad, then copy from the text input panel to where you want, and save the original formatting keepOriginalFormatting

+1
Oct 28 '16 at 7:20
source share



All Articles