How to Display Code in Microsoft PowerPoint?

The most complex ideas can be easy to take in when laid out in a PowerPoint presentation. Microsoft PowerPoint is a flexible program that allows you to showcase all kinds of information, making it useful for a variety of purposes.

Computer program instructions are no exception. Powerpoint lets you make use of internal features and external tools to display code. How you go about displaying the code will, of course, depend on what your reason for displaying it is.

Know your Objectives

The various methods of displaying code on PowerPoint each have their own merits and limitations.

Do you want your audience to be able to extract the code and manipulate it on their own? Or do you simply intend to temporarily show the code in order to explain something and get the point across? Perhaps you have functionality in mind and want to practically demonstrate the code at work.

It’s important that you first think about your intentions for displaying the code before deciding on which display method to go for.

The Methods

Here are a few methods to display a piece of code in a PowerPoint slide. Each one of them is best suited for a different purpose and objective. Don’t hesitate to try these options and see which one works best in your case.

Copy and Paste

There are a few ways to copy and paste code onto PowerPoint. You can do this either using the features that come with the program or tools from outside the program. One of the simpler ways, for example, is to create a text box in which you will paste the code you’ve copied from your notepad. 

To retain the original arrangement, you’ll want to right-click your text box and turn the text wrap off. For legibility’s sake, the need to stretch your code out throughout several slides may arise. You may also want to use the hyperlink feature so that even more information can show up when you click on a certain element.

You can insert your textbox in two ways. If you open your home tab, you’ll find an A in a box. You’ll click that A and follow up by clicking on the slide you want it to appear on. You can also find the create text box option under the Insert tab. Once again, you want to look for that A shape, clicking on it and then clicking on the slide as you would from the home tab.

Insert an image

Maybe all you want is to display your code as it is, for illustration purposes, without anyone needing to change it. Inserting an image is the perfect way to do it. All you have to do is to screenshot your code from wherever you have it typed out and save it as either a .jpg or .png file. When the image is stored, you’ll drop down the insert menu on PowerPoint and choose the picture option.

Make Use of Plug-Ins

If presenting code in PowerPoint isn’t just going to be a once-off thing for you, then this is the option for you. Get your hands on a code editor plug-in to help you copy your code onto your clipboard in an assortment of formats and paste it into your PowerPoint. 

See if you can get a code snippet plug-in, which lets you slip your code directly into your slides. You won’t have to worry about the program making changes to your code because the plug-in will handle that for you. Think of this as copy and pasting, just at a more efficient level.

Format from Within

There’s no need to stress about making the code more readable. PowerPoint allows you to format it in a way that makes it easy to digest. One way to achieve that is by setting up a monospace or code font (like Consolas). This font has big enough spaces between characters, which makes them easier to identify. 

This, in turn, makes the process of arranging the code elements much easier, which is great if you want to be thorough. You must highlight your code from your text editor, then copy and paste it into the program. From there, you highlight it again and change the font to monospace.

There is another way to format your code from inside PowerPoint. What you want to do is select the code you plan on formatting. You’ll then want to open your ‘format menu’. In your format menu, you should find the code block option, which is the one you will have to select. Just like that, your code will appear in a way that makes it easy to read.

Tips for Displaying Code

  • You don’t want too much going on on one slide. Otherwise, it might take away from what’s actually important. Any element that isn’t part of your discussion or presentation should be excluded. You can simply add some ellipsis to show that the code continues.
  • Take advantage of animation. You can use it for a more dynamic presentation, where functions can be exhibited, and transitions need to be made. They can prove especially useful when attempting to demonstrate some sort of progression in the code.
  • Before you go on running your presentation, you may want to first test it out. This will help you make sure your code isn’t challenging to read.
  • Consider exploiting PowerPoint’s action buttons for more organization and flow in your presentation. The key is to head to your insert tab, click on shapes, and then pick a button shape. You’ll then drag your shape to where you want to have it and assign an action to it either with the mouse click or mouse over the tab. You can add a hyperlink to take you elsewhere when carrying out your action or have it run a program. It’s entirely up to you what action you want to be carried out.
  • Feel free to change the background, size, and color of your code so it can suit your slides. Again, you can use PowerPoint itself or make use of a tool to help highlight your syntax images accordingly.

Looking for a reliable hosting for your website? MonoVM’s Linux VPS is one you can rely on. Its blazing-fast performance helps your website run smoothly and efficiently. Scaling resources as you go is easy, and the robust infrastructure ensures 99.99% uptime. Go and grab the best deal!

Display Away!

Now that you know how to display code on PowerPoint according to your needs, you can go ahead and do it. Learning all the neat little tricks in the Microsoft Office suite can prove invaluable for anyone in business.  Now is the perfect time to take this Powerpoint momentum and carry on to the rest of the suite.