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 it possible to embed programming source code to Powerpoint slide, and keep code highlighting/coloring?

share|improve this question
what application are you copying from? –  John T Dec 21 '09 at 4:26
I use textmate, e-texteditor and eclipse the most. –  Yousui Dec 21 '09 at 4:58

8 Answers 8

After pasting, a small "Paste Options" icon appears below the pasted text.

Click this icon and choose "Keep Source Formatting" :

enter image description here

share|improve this answer
I don't see such a Paste Options icon. I don't see a button to give me these options. I'm using PowerPoint:mac 2011. I think I have seen it in Windows versions, however. –  A-B-B Jul 19 '13 at 21:49
I tried different suggested methods and tools to copy from, but was actually missing that word/powerpoint was messing up the format by using "Destination Theme". Thanks! –  Tim Büthe Jan 22 '14 at 11:23

Pygments can format almost every format to rtf:

pygmentize -f rtf -o code.rtf code.py
share|improve this answer

Use Notepad++ with add-on NppExport.

  • Select the source code

  • Use Copy RTF to clipboard of NppExport

  • Paste into empty PPT slide (do not select any textfiled)

share|improve this answer
YES I wish I knew about this years ago –  KenB Mar 9 at 13:59

If the source code does not need to be copied and pasted out of the presentation, a quick and dirty solution could be to simply take screenshots of the source code.

share|improve this answer
Image can be fuzzy when zoom in. –  Yousui Dec 21 '09 at 4:58
Use the magnifier and then take a screenshot of that. –  wbeard52 May 17 at 0:57
  1. Click on Insert → Object → OpenDocument Text
  2. Paste on opened panel
  3. Click outside.

Note: Copying from Notepad++ will preserve colors and styling.

share|improve this answer

Pasting from Eclipse should retain formatting if the app supports it. I know Word does... not sure about PPT.

share|improve this answer
Works from Eclipse Juno to Word 2010, but not to Powerpoint 2010 - it loses the colours and converts some of them to bold text –  DNA Sep 4 '13 at 17:21

May I commend an excellent html service by ookii.org:


it works for C/C#/VB/HTML only though.

share|improve this answer

I've had no success pasting into Powerpoint 2010 on Windows.

However, pasting from Eclipse into Word 2010 works.

You can then save this formatted text as an RTF file, then embed the RTF into a Powerpoint 2010 slide using Insert Object (and optionally select 'link' so you can edit and update the text in Word).

share|improve this answer

Your Answer


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.