Share via


Formatting a Presentation

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

You use a Microsoft® PowerPoint® template to apply a consistent look to an entire presentation. A PowerPoint template is a presentation saved with a .pot extension that contains master slides and might contain regular slides. To see the difference, compare the master-slide-only templates found in C:\Program Files\Microsoft Office\Templates\Presentation Designs with the templates found in C:\Program Files\Microsoft Office\Templates\Presentations. Templates that contain slides typically include boilerplate text that you can replace with your own text to make a custom presentation.

Master slides specify the basic layout and formatting for the title slide in a presentation as well as regular slides, handouts, and notes. When you use the ApplyTemplate method, you specify the template that contains the master slides, which include the layout and formatting you want to apply to your presentation. For example, the following sample code applies the Fireball.pot template to the currently active presentation:

With ActivePresentation
   .ApplyTemplate FileName:="c:\program files\microsoft office\" _
      & "templates\presentation designs\fireball.pot"
End With

You can also use Microsoft® Visual Basic® for Applications (VBA) to create or manipulate master slides directly. Each Presentation object has a property that returns the available master slide that contains the formatting you want to use. You use the Presentation object's TitleMaster, SlideMaster, HandoutMaster, and NotesMaster properties to return a Slide object that represents the master slide you want to work with. Any changes you make to the layout or formatting of a master slide are applied to all slides of the specified type in the current presentation. For example, the following sample adds the CompanyLogo.bmp image to the background of the title master slide:

ActivePresentation.TitleMaster _   .Shapes.AddPicture(Filename:="c:\CompanyLogo.bmp", _
   Left:=100, Top:=200, Width:=400, Height:=300)

The master properties are useful when you want to apply changes to all slides based on a master, rather than applying changes one slide at a time. If you have an image or other formatting you want to appear on all slides in a presentation, make the change to the appropriate master slide.

See Also

Working with the Presentation Object | Working with Open Presentations | Working with Existing Presentations | Creating a New Presentation | Running a Slide Show from a Presentation