PowerPoint and Code Coloring

Learned a nifty trick to have your code on powerpoint with all the syntax highlighting.

Open your code in Notepad++. Use their many themes (Settings -> Style Configurator) to have the colors you want. To get correct syntax highlighting for the language, use “language” menu to choose correct language. Save the file to html by using their menu options plugins -> NppExport -> export to Html. Interestingly, you will not find this in “Save as” menu option.

Open the html file in  MS Word, and then drag and drop the code on PowerPoint.

In PowerPoint, code will show with the syntax highlighted. However, background is not copied, for that use Home ->”Shape Fill”  to get the background color.

This is better than cut and paste of code image, this way you can play with the fonts and sizes etc in PowerPoint.

PowerPoint team, are you listening? I shouldn’t be doing this in 2014 to get my code in PowerPoint.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s