10. Formatting Your Presentation


In This Chapter


Up until now, we have taught you how to make individual objects look amazing. In this chapter, we delve into easy ways to format your presentation as a whole.

In addition, we will show you some neat, timesaving features that will help change the look and feel of the presentation independent of what the content might be.

Uses of the PowerPoint Thumbnail Pane

image The Thumbnail pane—also known as the Slide Miniature pane, found on the left side of the PowerPoint window—is one of the easier ways to arrange slides (see Figure 10.1).

Figure 10.1 The Thumbnail pane.

image


Note

Another way to arrange slides is via the Slide Sorter view, where you can see all slides at once.


If you don’t see a list of thumbnails on the left side, go to the View tab, Presentation Views group and click Normal to switch back to Normal view.


Note

The Thumbnail pane was new to PowerPoint 2002 (Office XP). Before that, only the Outline option was available in the left pane.


Reordering Slides

Reordering slides is easy with the Thumbnail pane. Just drag slides up and down to change where they appear in the slide order. You can right-click a slide (see Figure 10.2) and choose to cut, copy, or paste it elsewhere in the slide order, or you can even copy it and then paste it into another presentation. Options for duplicating or deleting slides also exist.

Figure 10.2 Slide contextual menu.

image


Note

Not very well-known is the ability to change the layout of a specific slide or slides (if many are selected) by right-clicking and choosing a new layout from the contextual menu.


Apply to Many Slides

It’s easy to select multiple slides. Just click on one slide to select it, hold down Ctrl or Shift, and click other slides to add to the slide selection. (As with text, pressing Ctrl adds a particular slide to the selection, whereas pressing Shift adds all slides within the range of the first selected slide to the one you Shift+click on.) Then, all the commands described previously will apply to all the selected slides.


Tip

The Slide Sorter view also makes it easy to manipulate many slides at once. Select it by going to the View tab, Presentation Views group and choosing Slide Sorter.


Adding a Slide Background

image Inserting a background for a slide is easier than ever. To select from the options available in the current theme, go to the Design tab, Background group and choose Background Style. You will learn more about how Office comes up with these options in Chapter 11, “Dissecting Themes.”

To have more control over the options for backgrounds, you can right-click the slide and choose Format Background. PowerPoint treats the slide background as one giant shape, so you get the most power of shape formatting right here. For example, you can set a gradient or picture fill. Refer to Chapter 12, “Formatting Shapes, Text, and More,” to learn about the specific shape formatting options.

Understanding Slide Masters

image A great way to save a lot of time is to learn and understand how the Slide Master works. It will save you redundant work by allowing you to change how the Master looks, and each slide following that Master will reflect those changes.

For example, if you want the company logo to appear in the corner of every slide, change it on the Master one time rather than copying and pasting it onto each slide.


Note

By default, every presentation contains a Slide Master.


To modify the Slide Master and affect all slides under that Master, do the following:

1. Go to the View tab, Presentation Views group and choose Slide Master.

2. In the Thumbnail pane (far left, under the ribbon), the topmost item in the list is the first Slide Master. Below it are the Slide Layouts used in this presentation. Select the Master.

3. Modify the first Master slide in the list. For example, in Figure 10.3, we’ve added a logo to the top right. Watch as your changes appear on all the slides in the Thumbnail pane. Now you can close Master view.

Figure 10.3 The Slide Master will affect all slides that use this Master in your presentation.

image

This is useful not only for inserting content, but also for formatting slides—any formatting changes on the Master also apply to child slides. Try changing the background, fonts, colors, and more and notice the changes on slides that inherit from the Master. To see the changes, close Master view and return to editing mode.

Additional Masters

Just as in previous versions of PowerPoint, it is possible to create multiple Slide Masters. The difference in this version is that with each new Master created, a new set of layouts is created and associated with that Master (see Figure 10.4). We talk more about layouts later in this chapter.

Figure 10.4 Each new Master creates a set of new layouts. New Masters are placed after the currently selected Master, not at the end of the list.

image


Note

The multiple Masters feature was first introduced in PowerPoint 2002 (Office XP). Before that, each presentation could contain one Slide Master at most. Multiple Masters was a highly requested feature, but it was a very difficult feature to add since previous versions of PowerPoint allowed only one Master. Since they shared the same file format, versions of PowerPoint prior to 2002 still needed to be able to open and edit PowerPoint 2002 files.


To create a new Master, do the following:

1. If you are still in Slide Master view, skip to step 2. Otherwise, select the View tab and choose Slide Master.

2. On the Slide Master tab, Edit Master group, click on Insert Master.

With each new Master, you can apply new layouts to slides corresponding to that Master. To apply a layout from the new slide Master to a Slide Master, do the following:

1. Return to Normal view by going to the Slide master tab, Close group and choosing Close Master View.

2. Right-click a slide in the Thumbnail pane and choose Layout from the contextual menu.

Hide Background Graphics

This is a relatively obscure feature, but we feel obligated to mention it to you in case you see the little check box with the option and get confused.


Note

Experts might not find this feature obscure, as they tend to use it in combination with the new layouts to allow you to set up a slide so that you can use a layout without worrying about which background objects will come with the placeholders. It’s also useful if you have navigation elements on a slide layout or Master, but do not want those elements to be carried over to a specific slide.


Basically, this feature tells the current slide to ignore any pictures/graphics on the Master slide’s background. Usually if you are editing the Slide Master and you insert pictures, and then go back to your slides, each one inherits those Master pictures as part of the background. If you don’t want these graphics to show up on a slide, go to the Design tab, Background group and check Hide Background Graphics. Then, the background pictures on the Master slide won’t appear on this slide. Or, to apply this to all the slides in the presentation, do the following:

1. Right-click on a background of any slide, and select Format Background.

2. From the Fill table, you will notice the check box mentioned earlier that says Hide Background Graphics is unchecked by default.

3. Check the box and click Apply to All Slides, depending on what you want.


Note

This feature was very confusing in previous versions of PowerPoint. Not only was it labeled Omit Background Graphics from Master, but also the check box was checked by default, meaning that any new pictures added to the Master would not show up on all slides.


Introducing Brand New Slide Layout Options

image While Slide masters are not new to PowerPoint 2007, customizable Slide Layouts certainly are, and each Master can now have a series of layouts. This differs from previous versions in which layouts were hard-coded, and you were stuck with the few canned layouts preprogrammed by Microsoft.

Layouts 101

Let’s revisit some layout basics. For the uninitiated, layouts are templates to help you create certain types of slides by putting placeholders in some preprogrammed positions. Layouts define how and what content can be added to the slide by defining placeholders. Placeholders are explained later in this chapter briefly; they define a spot where an object can be added and can contain formatting, including effects, color, animations, and more. These save you enormous amounts of time and energy, as you can insert a slide with a certain layout that has placeholders ready to help you create content tailored for that type of slide.

The various layouts are similar to the ones found in previous versions of PowerPoint:

  • Title Slide
  • Title and Content
  • Section Header
  • Two Content
  • Comparison
  • Title Only
  • Blank
  • Content with Caption
  • Picture with Caption
  • Custom Layout

To create a new slide that follows a layout, use the drop-down from the Home tab’s Slides group in the New Slide gallery (see Figure 10.5).

Figure 10.5 Drop down the New Slide gallery to choose a layout for your new slide.

image

New Slide

If you simply click on the New Slide button without dropping down the gallery (clicking on the top part of the button), the default layout used is the same as the one inserted above it or the one selected. An alternative way to insert a new slide is to click in the Thumbnail pane on a slide where you want to insert a slide after, and then press Enter. Also if you click between slides in the Thumbnail pane and press Enter, a new slide is inserted.

Change a Slide’s Layout

If you want to change the layout of an existing slide, either because you just want to change it or because you do not like the default layout, do the following:

1. On the Home tab, Slides group, click the Layout button to open the gallery.

2. Select a layout (see Figure 10.6).

Figure 10.6 Change the layout of an existing slide.

image

Alternatively, you can right-click a slide in the Thumbnail pane and choose Layout on the contextual menu.

Customize a Layout

If the out-of-the-box layouts do not suit your needs, you have the ability to create your own type of layout. This is new to Office 2007. Layouts follow the master, meaning that they inherit all the contents of the Master Slide, but they can contain placeholders you add.

To create your own layout, do the following:

1. Enter Slide Master view by clicking on the View tab, and selecting Slide Master.

2. Click on Insert Layout.

3. Notice a new thumbnail in your Thumbnail pane corresponding to your new layout. If you hover your mouse over it, the name will be Custom Layout Layout (see Figure 10.7).

Figure 10.7 A newly created custom layout.

image


Note

The newly inserted layout is added below an existing layout if one is selected or between layouts if you have clicked between two. If a Master Slide is selected, the new layout is added to the end of the list.


4. Now that you have this new layout, insert new placeholders by going to the Slide Master tab, Master Layout group and choosing Insert Placeholder. Move content around and modify the slide in a way that you want any slide to be when set to follow this layout. This is covered in more detail in the next section.


Note

As with all masters, layouts can contain content that you want to show up on all slides that follow the layout. For example, you can give a background to all slides that follow the Comparison layout.


5. To rename the layout you have created, click the Slide Master, Edit Master, Rename button. It is a lot easier to keep track of them after they are named to describe what the layout actually looks like.

6. After you exit Slide Master view (Slide Master tab, go to Close Master View, and then Close), go to the Layout gallery again on the Home tab, and you will see the layout you created in the gallery.


Note

Layouts can be swapped with other layouts, and your slide will not lose its content. With a slide selected, insert content into placeholders and then click on Layout from the Home tab and select a different layout. Notice that your content is still there, but it has been moved around to fit the new layout.


Using the PowerPoint Outline Pane

image When you’re first whipping up a presentation, you’re usually really focused on content and not so much on how it’s going to look. You’re just putting down thoughts for topics you’re planning to cover. That’s where the PowerPoint Outline pane can come in handy.

Creating a Quick Presentation Outline

To begin, switch to the Outline pane by clicking the Outline tab at the top of the slide thumbnails (see Figure 10.8).

Figure 10.8 There are Slide and Outline tabs above the Thumbnail pane to help you manipulate the text more easily.

image

Using the Outline pane is similar to working in most outlining programs, or using Word’s outlining feature. See Table 10.1 for some basic guidelines for working in the Outline pane.

Table 10.1 Using the Outline Pane

image

If you can’t remember all of those, they’re also available on the contextual menu, which you can trigger by right-clicking on the outline.

In addition to the commands we described in Table 10.1 that have keyboard equivalents, the contextual menu also lets you show or hide formatting. You may have formatted the text to have crazy sizes or colors or other text formatting like bold, italic, or underline. By default the Outline pane doesn’t show you this to encourage you to focus on the text. This option lets you decide whether you want to show text formatting in the outline.

Creating Slides from the Outline

PowerPoint is great for creating and presenting a presentation, but despite what we wrote previously, you might not feel comfortable organizing your thoughts or writing text using the Outline pane. Some PowerPoint users prefer organizing text in Microsoft Word or Notepad, where they can focus on the text without worrying how it looks.

Here’s a simple outline we created in Notepad. Note that we used tabs to indicate different outline levels:

image

It’s now easy to import this text into PowerPoint when I’m ready to create my presentation.

Start up PowerPoint and go to the Home tab, New Slide group and click the arrow on the bottom half of Add Slide. Choose Slides from Outline at the bottom of the gallery (see Figure 10.9). Or, you can just click the Office button and from the Open options, you can open the Notepad file directly.

Figure 10.9 Insert slides from an existing outline; in this case we’ve added the outline to an existing presentation so it looks a little different than if you started from scratch.

image


Note

You might have to change the file type to outline. Also note that you don’t get a title slide in the new presentation; you only get content slides. This is a change from previous versions.


Then just apply a design template to make it pretty. This works most successfully with

  • Plain text files that are tab delimited
  • WordPerfect files
  • Word files that have headings created in Outline View

Placeholders Explained

image Placeholders are the hints at what should be added to a specific layout. They contain positions and content type (SmartArt, shape, table, and so on) suggestions that appear by default on the slide, depending on the layout. Placeholders do not show up during Slide Show mode unless they have content. In addition, they can contain formatting options such as effects, colors, animations, fonts, and more. This is a great time-saving opportunity when you know that there will be multiple slides of a given type and that they should all follow the same layout. Decorate this layout using placeholders, and you’re set.

Standard Placeholders

While the name may not ring a bell, you have definitely seen a placeholder and have most likely used one. By default, a new presentation opens to a Title Slide containing a Click to Add Title text box placeholder whose sole job is help you create content (see Figure 10.10). Notice that when you click inside a placeholder, the default text goes away and you can add your own title or subtitle.

Figure 10.10 The default Title Slide and Title Placeholders.

image

Text is not the only type of placeholder; in fact, many placeholders allow you to insert any type of content, including tables, SmartArt, charts, pictures, Clip Art, and media (see Figure 10.11). You are able to insert the following types of placeholders:

  • Content—Allows you insert text, tables, SmartArt, charts, pictures, Clip Art, and media
  • Text
  • Picture
  • Chart
  • Table
  • SmartArt
  • Media
  • Clip Art

Figure 10.11 The Content placeholder helps you save time by giving you an easy way to insert various types of objects.

image


Note

Have you ever noticed how the outline of placeholders is a dashed black and white line? This isn’t an accident; it’s so the outline is visible regardless of what color the background is. If it were a solid black outline, a black background would render the outline invisible.


The type of placeholder that exists on a slide depends on what type of slide is created. By default, the various types of Slide Layouts (described earlier) contain different placeholders corresponding to their type. Picture with Caption contains exactly what it should: a picture placeholder and two text placeholders (see Figure 10.12).

Figure 10.12 The Picture with Caption layout contains placeholders for a picture and a caption.

image

If you are familiar with the Placeholder icons that existed in previous versions of PowerPoint, you know that these little icons are shortcuts (the small images found inside the placeholder) to help you create content, going along with the theme that placeholders exist to make inserting or creating content easier. Simply click on an icon corresponding to the type of content you want to insert to save yourself a trip to the Insert tab.


Jumping Between Placeholders

Ctrl+Enter is a neat shortcut you can use to quickly jump between placeholders in a presentation. Let’s see it in action:

  1. To start, create a new presentation and make sure that you have a slide selected, not a slide thumbnail.
  2. Press Ctrl+Enter. You’re now in the title placeholder, which is the top placeholder.
  3. Type some text in the title placeholder.
  4. Press Ctrl+Enter again. Now you’re in the subtitle placeholder, the bottom of the two placeholders.
  5. Again, type some text, this time in the subtitle placeholder.
  6. Press Ctrl+Enter a few more times. Note that each time you press the shortcut keys, selection moves to the next available placeholder on the slide. Or, if you’re on the last placeholder on a slide, PowerPoint creates a new slide.

One other thing to try is to go back to the first slide in the presentation. If you press Ctrl+Enter, the first placeholder is selected, in addition to all the text inside. Press Ctrl+Enter again, and the same thing happens with the next placeholder.

Getting the hang of it? For power users, this is a fast way to jump between placeholders and type in text without having to tediously select slides one at a time and then select all the text inside that placeholder.

This works for text-based placeholders. For graphic or media placeholders, you can’t use this tip.


Custom Placeholders

image New to this version of PowerPoint is the ability to create your own placeholders. First you have to enter Master view so that you can edit one of the Slide Layouts.

1. Get into Master view (as we did in the previous section) by selecting the View tab and then selecting Slide Master.

2. In the Thumbnail pane, notice that one Slide Master has many Slide Layout slides branching from it (see the “Layouts 101” section earlier in this chapter). Select a layout you want to modify by clicking on any slide except the top one in the Thumbnail pane. We will choose the first layout right under the Master.

3. Click the Slide Master tab and go to the Master Layout group. Click Insert Placeholder to create a default Text Placeholder, or drop down the gallery to see what other types of placeholders can be inserted (see Figure 10.13). This would be useful if you need to add a text box to every title slide in the presentation.

Figure 10.13 The Insert Placeholder gallery allows you to create your own placeholders.

image

4. After you exit Slide Master view (Slide Master, Close Master View, Close), go to the Home tab’s Slides group and click Layout to open the gallery again, and you will see that layout now contains the placeholder you added (see Figure 10.14).

Figure 10.14 The layout you modified now contains that placeholder.

image


Note

A shortcut for getting back to the tripane view (normal view) is to simply click on the left-most view button on the Status Bar. Learn more about the View Indicator shortcuts in Chapter 16, “Running Slide Show Like a Pro.”


You can also decide the position of placeholders by clicking and dragging them around after step 3 in the previous example.


Caution

Be careful! If you edit the text inside the placeholder, you’re only editing the prompt text. This means that the Edit mode text you see is changed, but the Slide Show mode text doesn’t change. If you want a real text box with text inside to show up on the layout, insert a text box, not a placeholder.



Using Format Painter

We talk much more about the abilities of Format Painter in Chapter 12, but we want to point out one of its uses here—helping you make one slide take on the formatting of another slide.

As you might know, Format Painter takes formatting from a source and applies it to a destination. One nice use of this is on slides as a whole:

  1. 1. Select the slide you like in the Thumbnail pane.
  2. 2. Click the Home tab and in the Clipboard group, click Format Painter. Format Painter is the button that looks like a paintbrush. Notice how your cursor turns into a paintbrush.
  3. 3. Click another slide in the Thumbnail pane where you want that formatting applied.

Now you have two similar looking slides with the same theme, colors, fonts, and so on.



Note

The painter does not paint the layout, only the design-based items. If an element is on the layout but not on the Master, it is not painted on.


Customized Headers and Footers

image Headers and footers are annotations you can add to each slide that convey more information. They can be useful for displaying the current slide number, the date, a custom message, logo, and so on.

To bring up the Header and Footers dialog, select the Insert tab and in the Text group, click Header & Footer. You should see a dialog with two tabs—one for the Slide and another for the Notes and Handouts pages in case you want different information printed out for notes and handouts versus regular slides.


Note

This dialog also contains helpful settings, such as updating automatically for date and time. Also, it’s often helpful to not show headers and footers on the title slide, so there’s an option to Don’t Show on the Title Slide.


Adding header and footer information to all the slides is easy: Simply get the settings the way you want and click Apply to All from the Header and Footer dialog. This propagates the settings to all the slides.

By default, the formatting of the header and footer will follow the Slide Master. To change that, simply change the Master, and all the children follow:

1. Select the View tab and click on Slide Master.

2. Edit the styles and formatting of <#> or <footer>, but be careful not edit their values, or you might break the “header-ness” of it and cause it to no longer be a header value. Feel free to add additional text to these fields, though.

3. Close Master View.

Presenter Notes

image Presentations are not just about what the audience sees; there is a whole side to it specific to you, the presenter. Notice that an entire pane is dedicated to writing notes about a slide, and a specific view can be used to print out or just see what notes go with which slides.

Using the Notes Pane

The Notes pane is a great place to jot down some thoughts or ideas or even some prompts you have about a specific slide. It’s the pane located below your slide, and it can handle the text inputs and editing (see Figure 10.15).

Figure 10.15 The Notes pane, although small, is useful for keeping track of information corresponding to a specific slide.

image


Note

The Notes pane can only contain text, no graphics, or anything else. Also, the formatting is stripped on the text so that it looks black, but it can contain bullets.


The Notes pane is available from the Normal view, which is the default view when opening a presentation.

Using the Notes Page

You can display the contents of the Notes pane in a format that’s better suited to viewing the slide and the notes side by side, where the slide and the notes are presented on one page called the Notes Page.


Note

These are the same notes as in the Notes pane. If you edit them here, it changes the notes in the Notes pane and vice versa. This only holds true for the text box you see. The Notes Page is different in that you can add other objects such as shapes and pictures, but these do not appear in the Notes pane because it can only contain text.


To access the Notes Page, do the following:

1. Select the View tab and go to the Presentation Views group. Click Notes Page.

2. Notice a page for each slide with a picture of the slide on the top and the contents of the Notes Pane on the bottom in a text box (see Figure 10.16). The slide picture can be moved around but not edited, whereas the text box containing the notes can be edited.

Figure 10.16 The same information on the Notes Page.

image

When to Use Notes

We’ve noticed two distinct uses for PowerPoint notes.

One set of users exercises the ability to annotate a slide and display notes during Presenter View (see Chapter 16). This lets a presenter see notes for each slide as she presents, and the notes can be used as prompts for the speaker. In addition, while the presentation is going on, if a discussion occurs and the presenter wants to augment the annotations to the slide, Presenter View allows the presenter to change the notes during the presentation.

The other camp sees the Notes Page as more of a script view, where each slide is more like a picture and the notes can facilitate the telling of a story. The presentation in Notes Page format can be distributed in this format when printed.

One difference between the Notes Page over the Notes pane is that your notes can be richly formatted on the Notes Page. Just select some text in the notes, and go crazy with the Format tab on the ribbon. You can apply effects, fills, and outlines. If you then return to Normal view (on the View tab, go to the Presentation Views group and choose Normal), you will see that PowerPoint only shows bold, italic, and underline formatting.

Printed Handouts

image Along the lines of distributing presentations, there is another mode specifically designed for such a thing: Handouts.

Handouts are a great way to distribute your presentation in a way that conveys many slides on one page, especially if the level of detail is not necessary when viewing each slide.

To print a presentation as handouts, click the Office button and click the arrow next to Print. Under the Print What drop-down, select Handouts and then change the Handout options, such as how many slides are on each page and the orientation (see Figure 10.17).

Figure 10.17 The Print Handouts option is found on the Print dialog.

image

Handout Master

An entire Master is dedicated to how handouts look when printed. To access it, select the View tab and click Handout Master.

Now you can make modifications which will be propagated to all handouts such as the date, the orientation, styling, colors and so on. This is a handy way to modify the handouts all at once.


Word Handouts

If you feel more comfortable customizing your handouts in Word, Office makes it easy to export your data to a Word document.

This feature requires that you have Microsoft Office Word installed, which will most likely be the case unless you only have PowerPoint installed on your machine.

  1. Go to the Publish tab and choose Create Handouts in Microsoft Office Word.
  2. Choose the layout you think your audience will like (see Figure 10.18). Our favorite is the second choice, Blank Lines Next to Slides, which gets plenty of slides on each page and leaves room for the audience members to take notes about your brilliant presentation.

    Figure 10.18 Choose a format for your Word handouts.

    image

  3. Finally, choose whether to paste the slides into the Word document or to just paste a link to the slides. Just pasting the slides is a little safer, as links are known to get corrupted. But pasting a link is a handy option if you think that you might update the slides later and want the Word document to automatically update itself.
  4. Voilà! You have Word handouts (see Figure 10.19). You work with them in Word as needed, and then print them out.

Figure 10.19 The resulting Word handouts are created.

image


Color Modes

image This next feature is really helpful for previewing a presentation for printing, yet still allowing you to edit the presentation.

Essentially four different color modes exist: Color, Grayscale, Pure Black and White, and High Contrast Mode. The first three are accessible by default from the View tab’s Color/Grayscale group (see Figure 10.20).

Figure 10.20 Access different color modes from the View tab.

image

Viewing the Presentation Color Mode

Color is selected on the View tab by default, and your presentation in displayed in...well...color. Choosing Pure Black and White recolors all objects in your presentation to be either white or black. Similarly, choosing Grayscale changes all colors to a shade of gray. After the View Color Mode is changed, you can continue to edit the presentation normally, but view it as it would look like when printed to a black and white printer.


Note

These same color mode options appear in the Print dialog and in Print Preview.


Choosing a Per-Object Color Mode

After a different color mode is selected, a new tab is inserted in front of the Home tab. The tab name is different, depending on which color mode you selected. It contains another set of options, which we now describe.

In addition to having the ability to change whether a presentation is seen in color or one of the black and white modes, you can also set how each object is viewed. For example, if you want everything to be in grayscale except for one chart because it’s too hard to distinguish parts of the chart, you can set the Per-Object Color Mode to be black and white.


Note

High Contrast Mode is only available when Windows itself is in High Contrast mode. This is usually accessible from the Control Panel’s Accessibility option.


The options on the tab are shown in Figure 10.21. Settings chosen here also take effect when printing and are useful if you want a certain object to look differently when it is printed in black and white or grayscale mode.

Figure 10.21 The Per-Object Color Mode tab allows color modifications that apply only to the selected object.

image

It’s important to note that these options apply to a selected object. If nothing is selected, these options take effect on the slide background. This is one of the most confusing parts of the feature.


Note

This is useful in cases in which objects should not show up when printed or need to show up differently.


Programming PowerPoint with Macros

image One advanced feature in PowerPoint is the ability for software programmers to create macros, small computer programs that run inside PowerPoint.

For Experts Only

Previous versions of PowerPoint included a macro recorder, which let you click a record button, do a bunch of regular PowerPoint operations, and PowerPoint automatically generated a macro for you. This let even nonprogrammers create macros.

Unfortunately this functionality was dropped in PowerPoint 2007. So, only the truly advanced and curious will find this section interesting. If you end up programming PowerPoint, we officially deem you an expert.

Creating a Macro

Entire books are written about writing macros and Microsoft Office extensions, so we won’t try to do that here. Macros are programmatic actions that can be associated with an object when clicked or otherwise. They encompass just about anything you can do with PowerPoint by exposing an Object Model that you can use to program. We will take you quickly through creating one macro and give you some tools to create some of your own:

1. Enable the Developer toolbar. Go to the Office button, click PowerPoint Options, and then click the Show Developer tab in the Ribbon. Click OK.

2. Create a new presentation (Ctrl+N).

3. Go to Code group in the Developer tab the and click Macros.

4. Type in FirstMacro for the macro name and click Create.

5. Add the code snippet that follows, into the Sub. This code changes the title placeholder text on the first slide and also adds a rectangle shape. The result should be as shown in Figure 10.22.

Set firstSlide = ActivePresentation.Slides(1)
firstSlide.Shapes.Title.TextFrame.TextRange.Text = "PowerPoint rocks!"
firstSlide.Shapes.AddShape msoShapeRectangle, 20, 20, 200, 100

Figure 10.22 Some macro code added to the PowerPoint Visual Basic editor.

image


Note

This program crashes if you don’t have any slides in the presentation.


6. To run the macro, go to the Run menu and choose Run Sub/UserForm (or just press F5). If you close the Microsoft Visual Basic window and return to PowerPoint, you will notice that the first slide has changed.


Tip

You can add your newly created macro to the Quick Access Toolbar. Go to Office button and click the PowerPoint Options button. In the Customize section, under the Choose Commands From drop-down, select Macros. Then select your macro, click Add, and then click OK. Make sure that the macro is generic; otherwise, if you try to use it on a presentation that it isn’t meant for, it might fail.


Learn More

We barely scratched the surface when it comes to writing programs for PowerPoint. Here are some additional resources so that you can learn more:

  • A reference of the complete PowerPoint object model is available on MSDN here: http://msdn2.microsoft.com/en-us/library/aa644701.aspx. This covers all the programmable objects in PowerPoint, describing their properties and methods.
  • If you’re like us, you’re more comfortable programming with C#, C++, or even Visual Basic using the latest version of Microsoft Visual Studio, rather than using Office’s weird VBA language and its ancient code editor. Here’s an example of automating PowerPoint using Visual Studio: http://support.microsoft.com/kb/303718.
  • To make it even easier, Microsoft’s Visual Studio Tools for Office 2005 Second Edition product (VSTO 2005 SE) supports PowerPoint starting with its 2005 release (even though SE came out in November 2006), so you can buy yourself a copy from your favorite retailer.


Note

Visual Studio Tools for Office 2005 does not support PowerPoint; Visual Studio Tools for Office Second Edition (VSTO 2005 SE) does provide add-in solution support for PowerPoint. VSTO 2005 SE is a free add-on to Visual Studio 2005 Professional.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset