How To Format A Block of Code Within a Presentation? [closed]

I am preparing a presentation using Google Slides, though I can also work on the presentation within Open Office that will include code snippets.

Is there any easy way to perform basic syntax highlighting on the code snippets with either Google Docs or Open Office Presenter?

Edit: Since I believe that I can find a way to embed HTML, any tools that can perform syntax highlighting on HTML would also be welcome suggestions.


Solution 1:

An on-line syntax highlighter:

http://hilite.me/

Just copy and paste into your document.

Solution 2:

http://www.tohtml.com/ created syntax highlighted HTML code for lots of languages. It might be what you're looking for.

Solution 3:

If you're using Visual Studio (this might work in Eclipse also, but I never tried) and you copy & paste into Microsoft Word (or any other microsoft product) it will paste the code in whatever color your IDE had. Then you just need to copy the text out of word and into your desired application and it will paste as rich text.

I've only seen this work across Visual Studio to other Microsoft products though so I don't know if it will be any help.