OOXML Hacking – Lighting Controls for 3D

Office has the abilty to insert 3D models and to create 3D shapes. Both of these using lighting, but the Office interface does not include any lighting controls. To change 3D lighting, you have to hack the XML.

There is very little documentation online for 3D lighting in OOXML aside from the Microsoft pages at 2.31 http://schemas.microsoft.com/office/drawing/2017/model3d. The am3d element that represents 3D models does not appear in the older ECMA-376 reference that defines the Office file formats. ECMA 376 has been superceded by ISO/IEC 29500-1:2016.

When a 3D model is inserted in an Office document, the model file is storeed in the media subfolder, along with a PNG rendering of the view of the model when the document was saved. The PNG is displayed when the document is re-opened and serves as a fallback image when the file is viewed in an earlier version of Office that doesn’t support 3D models.

The rendering information for the model is stored in the document, not in the embedded model file. In Word, the rendering information is stored in word/document.xml. In PowerPoint, it is kept in ppt/slides/slideX.xml, where X is the slide index number. In Excel, look xl/drawings/drawingX.xml.

3D models use scrgbClr parameters for lighting color with numbers expressed in a percentage. But unlike scrgbClr elsewhere in Office, the syntax is not r=”50%” g=”50%” b=”50%”. Instead, use whole numbers with three zeros added, so 50% becomes 50000: <a:scrgbClr r=”50000″ g=”50000″ b=”50000″/>

Here is a typical lighting section for a 3D model or shape:

<am3d:ambientLight>
    <am3d:clr>
        <a:scrgbClr r="50000" g="50000" b="50000"/>
    </am3d:clr>
    <am3d:illuminance n="500000" d="1000000"/>
</am3d:ambientLight>
<am3d:ptLight rad="0">
    <am3d:clr>
        <a:scrgbClr r="100000" g="75000" b="50000"/>
    </am3d:clr>
    <am3d:intensity n="9765625" d="1000000"/>
    <am3d:pos x="21959998" y="70920001" z="16344003"/>
</am3d:ptLight>
<am3d:ptLight rad="0">
    <am3d:clr>
        <a:scrgbClr r="40000" g="60000" b="95000"/>
    </am3d:clr>
    <am3d:intensity n="12250000" d="1000000"/>
    <am3d:pos x="-37964106" y="51130435" z="57631972"/>
</am3d:ptLight>
<am3d:ptLight rad="0">
    <am3d:clr>
        <a:scrgbClr r="86837" g="72700" b="100000"/>
    </am3d:clr>
    <am3d:intensity n="3125000" d="1000000"/>
    <am3d:pos x="-37739122" y="58056624" z="-34769649"/>
</am3d:ptLight>

The first section is am3d:ambientLight that controls the ambient (background directionless) light. Set the color with am3d:clr and the intensity with am3d:illuminance. The illuminance n and d parameters represent the numerator and denominator of a ratio. So the default values of n=”500000″ d=”1000000″ are equivalent to 1/2 or 50% brightness.

After that, the are three point lights (am3d:ptLight). You don’t have to use all three. You can delete them from the XML, comment them out or use the enabled parameter to turn them off:

<am3d:ptLight rad="0" enabled="false">

The rad parameter sets the radius of the light. The units are EMUs (English Metric Units), where 1 inch has 914,400 EMUs and 1 centimeter equals 360,000 EMUs. Set this number in the millions to have a noticeable effect.

You can also add more point lights, but usually three is enough. The color and intensity parameters work the same way as the ambient light.

The other major parameters are for the position of the lights. The left-right position is set by the x number. 0 is dead center, positive numbers move the light to the right and negative numbers to the left. The y number controls the position up and down, while z controls the in-out third dimension. This line would place the light inside the model:

<am3d:pos x="0" y="0" z="0"/>

The pos units are also EMUs. Use tens of millions to notice the effect.

After making changes to the XML and re-opening the presentation with the model, the appearance will be the same as before you edited it. This is because PowerPoint displays a PNG of the model, created when you save. To display the revised lighting, you must make a small change to the model so PowerPoint updates the appearance.

Graphics Over Placeholders – Best Practices

Back at the dawn of time, when PowerPoint was first being programmed, a fateful and incorrect decision was made. Placeholder content would always appear in front of static content, regardless of how placeholders and other content were stacked on the layout. This has led to countless bald designers, from them tearing out their hair because there’s no way to place static graphics over placeholders. Here are 5 ways to work around this problem.


The Locked Graphics Graphics Over Placeholders Workaround

One way to circumvent this design flaw is to create a placeholder on the layout as usual. Then create a sample slide from it. Place the logo over the photo and lock its position in the XML. Here’s my article on how to do that: OOXML Hacking: Locking Graphics. This allows the user to replace the placeholder content while keeping the logo in front.

The disadvantage is that you can’t create a new slide from the layout. Instead, the user must copy and paste the sample slide to create another one.


The Background Picture Fill Workaround

If you’re trying to create replaceable background photos, there’s another method. Don’t place a picture placeholder on the layout. Instead, just place the graphic there. In use, the user right-clicks on the background and chooses Format Background. On the Format Background task pane, choose Picture or texture fill, then click on the File button and choose the background photo. The logo will stay on top.

The disadvantage to this technique is you have to include instructions to the end user, who may never have used a picture fill previously. My thanks to Jaakko Tuomivaara of Supergroup Studios in the UK for this tip.


Graphics Over Placeholders: The Placeholder Picture Fill Workaround

This works with any size photo, it doesn’t have to be full-frame like the previous hack. No copy and paste, no instructions required. I heard about this one from Joshua Finto (Make It So Studio in Austin, TX).

On the layout, insert a picture placeholder to hold the photo. Then add another placeholder on top, sized to exactly the same size as the logo. I use Online Image placeholders because they are rarely used, using a common placeholder type risks content being placed in it if you change layout types. Remove bullets, if there are any, and type a space character so no placeholder text appears.

In the Format Picture task pane, click on Picture or texture fill, then on the File button and fill the placeholder with the logo. Create a slide, place a photo and voila! The logo appears over top of the photo! After creating this, it’s wise to lock the placeholder in XML on that layout, to prevent distortion by the user playing with it. OOXML Hacking: Locking Graphics. EMF, SVG and transparent PNGs are all good logo formats for this application.


The Holey Placeholder (Windows)

For simple graphics, or logos contained in a simple shape like a circle or square, create a logo-shaped hole in the placeholder. Here’s how to do this in Windows:

  1. On the layout, create the picture placeholder.
  2. Insert the logo as an EMF vector file, then ungroup it twice, confirming with PowerPoint that you want to do this. This changes it from a placed picture to a set of vectors embedded on the layout.
  3. With the logo parts selected, hold the Shift key and click on the placeholder.
  4. Choose Drawing Tools Format>Merge Shapes>Subtract.
  5. Fill the background, or a shape placed behind the logo hole, with the logo color.

The Holey Placeholder (macOS)

If the logo is in a rectangle or circle, use this method in macOS. (It will work in Windows as well.) Place the logo over the placeholder, then draw a PowerPoint shape exactly the same size as the logo, placed over the logo precisely. Select the shape and the placeholder, then use Shape Format>Merge Shapes>Fragment, then delete the shape to reveal the logo-sized hole in the placeholder. For some reason, Merge Shapes>Subtract works differently on a Mac, deleting both the shape and the placeholder, but Fragment still get the job done. Thanks to Ute Simon for suggesting this method in the comments.

A variation on this that can be more detailed is to place a copy of the logo above the placeholder. Then, shape-by-shape, use the logo over the placeholder with the Combine variant of Merge Shapes to knock holes in the placeholder. Then add colored shapes below the placeholder to “fill” the holes. If you have compound shapes (like the letter O or A), you’ll have to release the compound shapes, then connect the inner shape with the outer one. Here’s what the end result looks like in Illustrator.

Outside line connected to inside to simulate a compound shape
Modifying compound shapes to place graphics over placeholders

Graphics Over Placeholders: The ActiveX Hack

I’m including this for completeness, but it’s the least desirable workaround, as it only can be created in PowerPoint for Windows.

  1. Choose View>Slide Master and choose the master or the layout to which you want to add a graphic.
  2. On the Developer tab, choose the Image control from the Controls group.
  3. Click on the Enable ActiveX button when the Microsoft warning appears.
  4. Draw the Image control to the size and postion the graphic will be.
  5. Right-click on the control and choose Property Sheet.
  6. Set the PictureSizeMode property to 3 – fmPictureSizeModeZoom.
  7. Beside the Picture property, click on None, then click on the three-dot button that appears.
  8. Select the graphic. The primary format choices are EMF, WMF, JPG, GIF and BMP. You cannot use a PNG file.

This process will fill the control with the chosen graphic, and the control will float above a placeholder in Slideshow mode.

There are several down-sides to this method:

  • If the graphic doesn’t fill the rectangle of the control, a light gray background will display in the unfilled area in PowerPoint for Windows
  • In PowerPoint for Mac, an ActiveX warning pops up every time you open the deck.
  • The graphics still fall behind the placeholders in Edit (Normal) mode. They only pop to the front in Slideshow mode.
  • In PowerPoint for Mac and PowerPoint for the web, some opaque white EMF shapes become transparent.

Thanks to my readers who have added some useful suggestions!

PowerPoint Font Embedding – Best Practices

Font embedding in PowerPoint is great, when it works. But macOS users can have mysterious problems that are hard to diagnose and even harder to fix. This article sorts out the most common PowerPoint for Mac font embedding issues and how to prevent them.


Some of Your Fonts Cannot Be Saved

The client has asked that the presentation be saved with the corporate fonts, to make distribution easier. On your Mac, you choose PowerPoint>Preferences>Save and check the Embed fonts in the file option, along with the Embed all characters sub-option, so the deck can be edited. Then you choose File>Save As to get the fonts embedded. But when you click the Save button, you get a dialog that reads: Some of your fonts cannot be saved with the presentation. Save the presentation anyway?

PowerPoint font embedding problem

First, trying fixing this with PowerPoint’s Edit>Find>Replace Fonts utility. If that works, you’re good to go. But if it doesn’t, you’re probably dealing with a bullet font problem.

When you create a custom bullet in PowerPoint for Mac, PowerPoint uses the macOS Emojis & Symbols utility for picking the bullet. But the Emojis & Symbols dialog doesn’t immediately tell you which font is being used. You have to click on a sample in the Font Variation area to check the typeface. If you don’t choose a font variation, the Emojis dialog will give you a symbol from one the system fonts.


System Font Regular Can’t Be Embedded

When you first try to enter a custom bullet, the Emojis & Symbols dialog appears in condensed form:

Condensed Emoji & Symbols dialog

It’s nearly impossible to insert an embeddable bullet from this dialog, as only macOS system fonts are displayed. Instead, click on the expander icon in the upper right corner (circled in red) to view the large form of the dialog:

Emojis & Symbols large dialog

A bullet is selected, and the preview in the upper right corner is labelled BULLET. When the font name is not displaying here, you are inserting a non-embeddable bullet from an Apple system font. Saving the file displays this dialog:

Incompatible format for PowerPoint font embedding
System Font Regular isn’t an actual font. It’s a pointer to whatever font macOS is currently using to display opertaing system text. The font can change between releases of macOS, but the pointer retains the same name.


Unsupported Font File Format

The key to choosing an embeddable bullet is to always choose one from the Font Variation panel in the lower right side of the dialog. But not all of those variations will work! Any font with Apple in the name is formatted as an AAT (Apple Advanced Typography) font. Here, I’ve chosen Apple SD Gothic Neo Regular as the bullet font:

AAT font choice

But when I save, I see this:

Unsupported font file format

AAT fonts can’t be embedded in Office files!


PowerPoint Font Embedding – What Works

All the other fonts that I’ve tried in the Font Variations panel can be embedded. Here, I’ve chosen Arial:

Arial Font Variation

The file saves! No errors!

Here’s your working procedure for custom bullets in macOS:

  1. Always expand the Emojis & Symbols dialog to full size.
  2. Always choose a bullet from the Font Variations panel.
  3. Never choose a bullet from a font that has Apple in the name, nor one that is called System Font Regular

I haven’t tested every font, so there could other than cause issues. If you find one, please write to me and I’ll update this article.

Keep in mind that fonts can also have embedding permissions set by the foundry that prohibit embedding, so these would be a poor choice for use with Office. But that’s an issue in Windows as well as macOS


PowerPoint Font Embedding – Fixing a Problem

You got the dreaded Save with Fonts dialog, and you’ve tried Edit>Find>Replace Fonts. The dialog still appears. What do you do now? That’s a real problem in PowerPoint for macOS.

In Windows, I fix these issues with the following steps:

  1. Open the file in PowerPoint, choose Save As and set the Save as type dropdown to PowerPoint XML Presentation (*.xml) and click on Save. This saves the deck as one giant XML file instead of the usual format of many small XML files tucked into a Zip archive.
  2. Open the XML file in a text editor. NotePad will work but a real coding editor like NotePad++ or Microsoft Code is better.
  3. Do a Find and Replace, finding typeface=”System Font Regular” (substitute the problem font name) and replacing it with typeface=”Arial” (substitute a known embeddable font name).
  4. Save the file, open it in PowerPoint, then resave in normal .pptx or .potx format.

Unfortunately, Microsoft has not given PowerPoint for Mac the XML single-file format. So the fix requires that you check each bullet in the slide master, slide layouts and slides. PowerPoint does not have a way of seeing what the font is for existing bullets, so you have to slog through and replace every damn one! Yuck!

Out of time and no access to PowerPoint for Windows? Send the file to us, and we’ll do the fix for you.

Most Recent Office You Can Run – Best Practices

As Apple and Microsoft release new operating systems, it’s no longer possible to install the latest version of Office on your old computer. Here’s is a list of the most recent Office you can run for the operating system you have, plus where to find it.


Most Recent Office You Can Run on macOS (Updated for 2024)

Rant alert! Microsoft supports the last three operating systems in both Windows and Mac. Unfortunately, Apple has a policy of releasing a new operating system every year, whether we need it or not. The result of these two business decisions is that there are rafts of perfectly serviceable Macs out there that can no longer install the current version of Office. It looks like Apple intends us to toss them and buy new ones. Another case of lip service to environmental sustainability. Rant over

If you buy or subscribe to Office for Mac today, you’ll only find the current versions of Microsoft 365 (the subscription version) and Office 2021 (the retail edition) to be easily available. But Microsoft maintains a page of older installers at Update history for Office for Mac. All of them can be activated under a current Microsoft 365 subscription or Office 2021 license.

Please note that all of these are final releases: there will be no security updates to follow. Be careful when downloading Office files from the interweb.

At the time of writing, the current crop of obsolete Macs are those that can only run Big Sur (macOS 11). These are machines that are around 10 years old, but are completely useable for applications like Office. The last Office version that Big Sur can run is 16.77. At the History page, look for the Office Suite Installer, with or without Teams, dated September 12, 2023. Do not download the updaters for individual programs! Download the Office Suite installer!

Then run the downloaded installer. After installing, normally Microsoft AutoUpdate fires up and installs the final 16.77 version. Wait until it finishes, then open Applications and run one of the Office apps.

Prompt to sign in.

You’ll see a dialog prompting you to sign into your account. Enter your name and password.

Enter your Microsoft Account email and password.

If you’re a Microsoft 365 subscriber, that should be the end of the process. Your software will be activated and you’re good to go.

If you have purchased multiple permanent license editions, you’ll see a dialog asking to to choose which license to apply. Office 2019 and 2021 no longer have separate licenses for Mac and Windows, so at this point it possible to switch Office 2019 (for example) from Windows to macOS or vice versa.

Choose an Office license to use with your installation.


Older Editions of macOS

Catalina (macOS 10.15) can run Office 16.66. At the History page, look for the Office Suite Installer, with or without Teams, dated October 11, 2022. Reminder: Do not download the updaters for individual programs! Download the Office Suite installer!

Office for Mac Update History

Catalina was the first OS to require 64-bit software. This requirement made Office 2011 obsolete, since it’s 32-bit. But Office 2011 is still a useful edition in macOS. It can still do things that were permanently removed from later versions of Office. So you might want to stick with Mojave and install the newer Office that goes with it. (There’s no problem in having Office 2011 and a later version installed on the same computer.) In this scenario, download and install the 16.54 version dated October 12, 2021.

One of my favorite Macs is my 17″ MacBook Pro. It’s the machine that travels with me, but it’s 12 years old and can run only High Sierra. The most recent Office you can run on this computer is 16.43, dated November 10, 2020.

There’s a pattern here: Apple releases new operating systems in the fall, usually in September or October. The Office version that Microsoft releases the same month is the last one for the fourth-oldest macOS. I don’t have any machines running Sierra, but if I did, I would try the October 15, 2019 edition of Office 16.30.

As I mentioned earlier, you can run an older version of Office on an older computer. Since Office 2008, the file format has remained pretty constant, so the software can still be useful. You can install Office 2011 under Mojave or earlier, while Office 2008 can be installed under El Capitan and earlier. These versions can co-exist on a Mac with a newer version (or with each other), though Microsoft’s History page only goes back to 16.27 from July, 2019.


Most Recent Office You Can Run on Windows

Under Windows, the situation is easier, as Microsoft waits about 3 years between operating systems. Plus Windows isn’t as finicky about the hardware it runs on. I have an old Mac Pro from 2006 that can only run OS X Lion and Office 2011, but under Boot Camp it does either Windows Vista and Office 2010, or Windows 7 and Office 2016. Windows 8 is likewise limited to Office 2016, while Windows 10 (now 9 years old!) can run the current version of Office 2021 and Microsoft 365. You have to have a really old Windows computer to be unable to run a useable copy of Office.

PowerPoint Icon Gallery – Cool Code

Years ago, Ken Puls of the excellent Excelguru site published an Excel add-in that displays the icons built into Excel. This reference is useful for any programmer wanting to repurpose built-in icons to use with their own code. Here’s where you can download the original: Office 2007 Icon Gallery. His version has gradually become outdated as Microsoft has added more icons to the software, and there was no version for PowerPoint. The latter isn’t such a big deal, because Excel, Word and PowerPoint share a common library of icons.

With Ken’s gracious permission, I’ve created an updated PowerPoint version of this add-in. This displays all the icons in current versions of Office, and it runs under PowerPoint for Windows and for Mac.

This is version 2. If you downloaded this prior to January 24, 2023, please download and install this improved version. I haven’t created an installer for this, but here are the instructions for manual installation:


PowerPoint Icon Gallery Installation

Download Link

Icon Gallery Add-in Download

Windows Installation

The download is a zip file that holds a single Icon Gallery.ppam file. Expand the zip and copy the .ppam file to your desktop or other easy-to-find location. Here’s how to make it appear in PowerPoint for Windows:

  1. In PowerPoint, choose File>Options>Add-ins.
  2. Change the Manage dropdown to PowerPoint Add-ins, then click on the Go button. The Add-ins dialog opens.
  3. Click on the Add New button. Navigate to the location where you saved the .ppam file, select it and click on OK. The Add-ins dialog should look like this, displaying the add-in name with a check mark beside it:
    Windows Add-in Dialog
  4. Click on the Close button.
  5. In PowerPoint, select the View tab. At the right end, you should see a new group called Office Icons:
    Office Icon group

macOS Installation

  1. In PowerPoint, choose Tools>PowerPoint Add-ins from the macOS menu bar. The Add-ins dialog opens.
  2. Click on the Plus (+) sign. Navigate to the location where you saved the .ppam file, select it and click on OK.
  3. PowerPoint will pop up a macro warning. Click on the Enable Macros button.
  4. Then PowerPoint will pop up this dialog, astoundingly badly worded, even for Microsoft:
    Turn Off Macro Virus Protection
    It sounds like you’re turning off macro protection completely, right? Well you’re not. This just turns it off for this file, and it has no effect on the macro virus protection settings, so there’s nothing to even turn on again! Click on Turn Off.
  5. The Add-ins dialog should look like this, displaying the add-in name with a check mark beside it:
    Icon Gallery Add-in
  6. Click on the OK button.
  7. In PowerPoint, select the View tab. At the right end, you should see a new group called Office Icons:
    Icon Gallery on View tab

Using the PowerPoint Icon Gallery

Windows Useage

Click on one of the galleries to see a group of icons. Here are the first 256:
Gallery 1 Icons

Hover over an icon to see its idMso command name.

Click on an icon to open a dialog that shows the command name for use with idMso or imageMso commands. Click on the Copy to Clipboard button to copy the command name. Then paste the name into your XML or other code. Due to a bug in File Explorer, all Explorer windows must be closed for this to work as expected.

macOS Useage

Click on one of the galleries to see a group of icons:
Icon Gallery - Mac
Note the grey spinning icons: Those are objects that exist in the Windows version, but not in macOS. One of the drawbacks of trying to develop for both platforms is that Microsoft has only done half the job in Office for Mac. Avoid these icons for cross-platform macros.

Hover over an icon to see its idMso command name.

Click on an icon to open a dialog that shows the command name for use with idMso or imageMso commands. Click on the Copy to Clipboard button to copy the command name. Then paste the name into your XML or other code.


Uninstalling the PowerPoint Icon Gallery

Windows Uninstall

  1. In PowerPoint, choose File>Options>Add-ins.
  2. Change the Manage dropdown to PowerPoint Add-ins, then click on Go.
  3. Select the add-in, then click on the Remove button. Close the dialog. The icon gallery disappears from the View tab.

macOS Uninstall

  1. In PowerPoint, choose Tools>PowerPoint Add-ins (on the macOS menu bar).
  2. Select the add-in, then click on the Minus sign (-). Close the dialog. The icon gallery disappears from the View tab.

Notes

Wouldn’t it make more sense to have this on the Developer tab? Well, yes, it would, that’s where the Icon Gallery appears in Ken Puls’ original add-in. But I made one file to work on both Windows and macOS. PowerPoint for macOS is missing the Developer tab. So I put this on the View tab as a second-best location.

Why no icon preview, as in Ken’s original add-in? Previewing icons in VBA relies on the CommandBars.GetImageMso command. This has been deprecated and in recent versions of Office, does not deliver an accurate icon preview. The command is not available at all on Macs, so I removed the preview. But you can see the 32 x 32 version of the icon in the gallery dropdown, not much has been lost.

Chart Templates – Best Practices

Chart Templates allow you to capture and reproduce the appearance of sample charts. This avoids having to include sample charts for users to copy and paste. Here’s how to use them:


Installing

Chart templates must installed to a particular folder so Office can find them.

Windows Installation

  1. Open a File Explorer window.
  2. In the address field, paste in: %appdata%\Microsoft\Templates.
  3. If there isn’t a Charts folder there, create one.
  4. Copy the chart template(s) into it.

macOS Installation

  1. While holding down the Option key, click on the macOS menu bar. Choose Go, then Library. The hidden user Library folder opens.
  2. Open ~/Library/Group Containers/UBF8T346G9.Office/User Content/Chart Templates.
  3. Copy the chart template(s) into it.

Using Chart Templates

Chart templates can be used in Word, Excel and PowerPoint. Here’s how to access them:

Windows Usage

  1. In the Office program, choose Insert>Chart.
  2. In the Insert Chart dialog, click on the Templates icon.
  3. Select the chart template in the right-hand pane, then click on OK. A chart is inserted in your document.

macOS Usage

  1. On the Insert tab, choose Charts>Templates and select the template from the pop-up list. A chart is inserted in your document.

For more information about creating chart templates that work better then the Microsoft default, please see OOXML Hacking – Chart Template Colors

OOXML Hacking: Buy the ebook

The ebook version of OOXML Hacking has been released. The last three years have gone into adding the equivalent of 40 pages of new information. This is in addition to the trove of unique techniques that already appeared in the print version. Here are screen shots of the table of contents, to give you an idea of the topics covered in this publication:

Table of Contents 1
Table of Contents 2
Table of Contents 3

Barnes & Noble distributes only in the U.S., so use Kobo.com if you’re from another country.

As always, all techniques are covered in both Windows and Mac, where possible. The book contains a link to a downloadable text file of all listings in the book, so you don’t have to re-key text from the screen. The book is currently available on Kobo.com and Barnes & Noble. Barnes & Noble distributes only in the U.S., so use Kobo.com if you’re from another country.

Some have asked if they can use a Kobo book in a different reader. The answer is Yes! Here is Kobo’s page on how to download books from your Kobo account to export to another device or app.

Please note, this e-book has digital rights management applied. All code listings are available in a downloadable text file, so you don’t have to re-key anything. If you have any problems, please contact us at this address

Your Office Questions Answered – Best Practices

Brandwares provides top-quality, bulletproof templates to a world-wide clientele. We have the Client List to prove it. But you can get your Office questions answered for free (or cheap)!

I answer questions online about PowerPoint and Word for both Windows and macOS. For general questions about formatting and using both programs, visit the Answers.Microsoft.com Word or Answers.Microsoft.com PowerPoint forums. If you’re a VBA programmer working with Word or PowerPoint, you can get my help at the Stack Overflow Word or Stack Overflow PowerPoint pages.

I also answer questions at Experts Exchange, where I’ve been awarded a Distinguished Expert award for 2021.

Office Questions Answered - Experts Exchange Distinguished Expert 2021

This site isn’t free, but it is jam-packed with expertise. There’s a 7-day free trial, if you want to check it out. Tag your post with Microsoft PowerPoint, Microsoft Word, VBA and/or Fonts Typography to ensure your Office questions are answered.

Microsoft-Compatible PowerPoint Templates – Best Practices

The vast majority of presentations are created using the default templates that comes with Microsoft PowerPoint. All Microsoft-compatible PowerPoint templates have a uniform structure, and the result is that you can copy and paste slides between any deck and the paste works as expected: the content comes across perfectly, and the formatting is updated.

But in almost all corporate presentations with custom templates, this no longer works. Slides pasted from Microsoft-based presentations always need to be reformatted manually, because the custom template haven’t been created to be Microsoft-compatible.

It doesn’t have to be this way. Here’s how to create custom templates that will be both Microsoft-compatible and have a look and feel that is brand-compatible with the organization.


What’s in a Microsoft-Compatible PowerPoint Template?

Most designers create presentation templates incorrectly for the purpose of importing of slides created with Microsoft templates. Almost universal infractions include deleting or renaming the default slide layouts, and deleting or adding placeholders on whatever default slide layouts are left. Less common methods that designers use to wreck templates include deleting all placeholders on the master slide, and deleting all default layouts, then trying to replace them

To understand why these actions could cause problems, we need to understand the PowerPoint file structure. All new blank PowerPoint files contain the following:

  • 1 Master Slide (in Slide Master view, the larger slide at the very top of the left-hand thumbnail list). The parent to all the layouts, to which the slide layouts are children. All text formatting is inherited from this slide. Deleting placeholders here will cripple the template.
  • 11 default slide layouts, which inherit the formatting set in the master slide. These 11 comprise:
  • Title Slide, for the presentation title.
  • Title and Content, for the bulk of the presentation content.
  • Section Header, to divide the deck into relevant sections.
  • Two Content, with 2 content areas.
  • Comparison, similar to Two Content, but each content area also has a corresponding heading placeholder.
  • Title Only, displaying only a Title field, with the rest of the slide blank.
  • Blank, with not even a Title field.
  • Content with Caption, a little-used layout the includes a Title, Text and Content placeholder.
  • Picture with Caption, similar to Content with Caption, but with a Picture placeholder replacing the Content one.
  • Title and Vertical Text This layout is intended for Asian language use and is only displayed as a choice if your operating system has an Asian language set up.
  • Vertical Title and Text Similar to the previous layout, only visible on computers with Asian language input enabled in the operating system.
Mandatory default layouts (Asian-language-enabled system).
Microsoft-compatible PowerPoint Layouts

Each of these layouts has a specific layout type, set in XML and not alterable in the program interface. You can create the correct placeholder types by generating a new, blank PowerPoint file. Each of these layouts contains placeholders for the date and slide number, plus a footer field. All but 1 have a title placeholder.

Here’s the second line of a default Microsoft layout. In this example, obj is the XML type for a Title and Content layout:

<p:sldLayout xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"
type="obj" preserve="1">

If a slide layout has been created by the user from the Insert Layout command, that layout will not have a type. Instead, the second line of the XML will include userDrawn=”1″:

<p:sldLayout xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"
preserve="1" userDrawn="1">

PowerPoint reads the userDrawn property and will not treat your layout as a default layout no matter what you do to it. It will never be Microsoft-compatible.

If you have deleted a default slide layout, you can restore it by creating a new blank presentation, then copying and pasting the layout under the slide master of the deck to be repaired. You can also restore a default layout by running this VBA:

Sub RestoreLayout()
  With ActivePresentation.Slides
    .Add(.Count + 1, ppLayoutObject).Delete
  End With
End Sub

The example above restores a deleted Title and Content layout. Just change ppLayoutObject to the type you need from this list:

Layout Type VBA Parameter
Title Slide ppLayoutTitle
Title and Content ppLayoutObject
Section Header ppLayoutSectionHeader
Two Content ppLayoutTwoObjects
Comparison ppLayoutComparison
Title Only ppLayoutTitleOnly
Blank ppLayoutBlank
Content with Caption ppLayoutContentWithCaption
Picture with Caption ppLayoutPictureWithCaption
Title and Vertical Text ppLayoutVerticalText
Vertical Title and Text ppLayoutVerticalTitleAndText

Here are the recommendations that Microsoft should have published with the release of PowerPoint 2007: All new PowerPoint templates should include all default slide layouts and placeholders. That would have saved so much grief! Every file would be a Microsoft-compatible PowerPoint template or theme.

Please note, I am not suggesting that you restrict your design to only these layouts and placeholders. As long as you have the default layouts with the default placeholders, the rest of the master slide view can be filled with all kinds of special-purpose layouts with any number of placeholders. Just remember, whatever you create today must be supported in the future, if the slides are to remain paste-compatible. For more details, please see my article about best practices for reusing old (legacy) slides: Legacy Slides – Best Practices

I’m adding a plea for sanity on behalf of users everwhere: restraint in slide layout numbers is best for your client’s users. Too many layouts and they just don’t know which one to pick! Don’t confuse them more than they already are. Consider a limit of 25 layouts maximum.

We have years of expertise in this area and can assess your template for Microsoft compatibility, or create a template or theme for you that will work seamlessly with decks based on Microsoft templates. We’re here to help! Contact me at production@brandwares.com.