Logo: TechTrax...brought to you by MouseTrax Computing Solutions

Behind the Scenes with Document Themes

by Stephanie Krieger

This article is protected by Copyscape! DO NOT COPY without permission!

Skill rating level 4.

So, you’re using the 2007 Microsoft Office release and you’re already using Themes in Word, Excel, and PowerPoint. You know that themes provide fonts, colors, and graphic effects to your documents in all three programs, as well as slide master, layout, and background formatting in PowerPoint. But, what really goes into the details of a theme?

If you’re ready to dig deeper into themes, this article can help. Here, you can explore how the components of a theme fit together, what settings are used to determine various formatting gallery entries (such as Shape Style or SmartArt Styles), and what you need to know to create a complete custom theme for yourself.

Note: This article makes some assumptions about your experience with themes in the 2007 Office release, and with your Microsoft Office experience in general. If you’re looking for more basic information, just want to fill in a few blanks, or you’re ready to go even further—find links to additional resources at the end of the article.

Also note that customizing some theme components requires editing your document’s XML code (known as Office Open XML). For the purposes of this article, I’ll tell you when theme elements can only be edited in XML and I’ll provide some tips for those already using Office Open XML. However, you don’t need Office Open XML experience for this article, as the article doesn’t actually take you into the theme’s XML. The additional resource links at the end of the article include some resources for learning the basics of working with Office Open XML.

In this article

          Saving a Theme from PowerPoint

•     Understanding Theme Files
      Using the Browse for Themes feature to easily share themes
      Extracting theme components from a document

•      Creating Custom Theme Effects and Background Styles
      How theme effects really work
      Understanding the Background Styles gallery
      Learning how to edit a theme’s XML

•     Additional Resources
      Theme Basics
      Office Open XML Essentials

Saving a Theme from PowerPoint

When you save a custom theme from Word or Excel, you’re saving the theme colors, theme fonts, and theme effects that are currently applied in the active document. While a theme created from a PowerPoint presentation includes those settings, that theme will also include whatever slide master, slide layout, and background gallery settings are active in the presentation at the time of the save.

The reason for this additional content when themes are saved from PowerPoint is that themes are actually PowerPoint-based functionality. Think of them as the evolution of PowerPoint design templates. So, if you save a theme from a Word or Excel document, consider completing that theme by applying it to a PowerPoint presentation and then adding master and layout formatting. Once you have all desired theme elements in place in your active PowerPoint presentation, just resave that theme. To do this, on the Design tab, click to expand the Themes gallery, and then click Save Current Theme. In the Save Current Theme dialog box, select the theme file you’re replacing and then click Save, just as you would when replacing a document by using the Save As dialog box.

Understanding Theme Files

Though you save a theme as a .thmx file, a theme typically includes four related files: the .thmx file itself, an .eftx file for the theme effects, and two .xml files—one for theme fonts and one for theme colors.

The .thmx file includes all theme elements, so you can share an entire theme just by sharing that file. So, why do the other three files exist? The idea is that you can mix and match—create your own theme by combining colors, fonts, and effects from different themes.

You also may need just one component of a theme in some cases. For example, say that you’re creating a set of Word templates for your company. If your company’s colors are very light, you may want to have a second, darker set of theme colors that a user can apply to a document they need to send by fax.

Note: Remember that you can create your own theme color or theme font sets from Word, Excel, or PowerPoint. To do this, click to expand the Theme Colors or Theme Fonts gallery in the active program (find the Themes group on the Page Layout tab in Word or Excel, or the Design tab in PowerPoint), and then click the Create New Theme Colors (or Fonts) option at the bottom of the gallery. You can also right-click any custom theme colors or theme fonts that appear in the gallery for the option to edit them.

Using the Browse for Themes feature to easily share themes

The Browse for Themes option at the bottom of the Themes gallery in Word, Excel, or PowerPoint enables you to apply the theme fonts, theme colors, and theme effects elements from any 2007 release Word, Excel, or PowerPoint document to your active document, workbook, or presentation. For example, a theme saved in an Excel workbook can be applied to a Word document—or a theme saved in a PowerPoint presentation can be applied to an Excel workbook. Theme-ready 2007 release files actually carry the cross-Office components of a theme along with them, so you don’t have to share your actual theme files in order to share many elements of your theme.

Note: When a theme is applied to a Word or Excel file, slide layout and slide master formatting are not stored in that document. (Background Styles, however, are included.) So, if you want to use the Browse for Themes feature to apply a complete theme for use in PowerPoint—be sure to share either a .thmx file or a PowerPoint 2007 file. Note also that the collection of slide masters and slide layouts included in a PowerPoint 2007 file are considered part of the active theme for that file, whether or not they have ever been saved in a theme file.

Extracting Theme Components from a Document

You open a 2007 Office release document and then click the Theme Colors gallery in the applicable program, but no set of theme colors is selected. When this happens (or you get similar results in the Themes, Theme Fonts, or Theme Effects galleries), keep in mind that the theme components contained in a document may not be installed on your computer—such as if you open a document that was created on another computer using a custom theme or if you use custom theme components in a document and later delete those theme components from your computer.

However, if you want to reuse theme components stored in a document, you can save them directly from the document itself. For example, when you click Create New Theme Colors at the bottom of the Theme Colors gallery, the dialog box that opens displays the set of theme colors currently available in the active document.

Creating Custom Theme Effects and Background Styles

If you’ve been creating your own custom themes, theme colors, or theme fonts, you’ve probably noticed by now that you can’t save custom theme effects from Word, Excel, or PowerPoint. Additionally, you can’t customize the Background Styles gallery from within PowerPoint. However, that doesn’t mean that you can’t customize them.

Naysayers may tell you that you can’t customize all aspects of a theme—just as many people may tell you that you can’t customize the Ribbon. However, for advanced Office users, both of those statements are unequivocally false.

You may already know how easy it is to customize the Ribbon through Office Open XML—if not, check out the additional resources links at the end of this article for more information on that subject. Well, customizing theme effects and background styles through Office Open XML can be a bit more complex than customizing the Ribbon (depending on what it is you want to customize), but more advanced Office users are likely to find it no more difficult than tasks such as creating nested fields in Word or nested functions in Excel—and probably easier than some of the complex document work you may already do.

How Theme Effects Really Work

Theme effects control the styles that you see in most of the graphic Quick Style galleries throughout Word, Excel, and PowerPoint—including Shape Styles and WordArt Styles (in Excel and PowerPoint only), SmartArt Styles and Chart Styles in all three programs, and Table Styles in PowerPoint.

Notice that styles are different from one gallery to the next even within the same theme. For example, SmartArt Styles include styles named Subtle, Moderate, and Intense (among others)—whereas Chart Styles are numbered and don’t necessarily match all of the formatting in the SmartArt styles. These differences make sense because it may not be practical to have some of the same formatting on a chart that you have on shapes in a diagram. So, how are all of those styles determined?

If you examine the XML file that stores theme information in a 2007 release document, template, or theme file, you’ll see three sets each of line, fill, and effect formatting. The three sets correspond to subtle, moderate, and intense effects. Theme functionality in Office then takes the line, fill, and effect settings and combines them in a variety of ways to automatically populate the gallery entries. So, for example, you can adjust the line formatting stored in a presentation’s active theme effects and then see the changes implemented throughout Quick Style galleries wherever that line formatting is included in a style.

So, the good news in terms of the way Quick Style gallery entries are created is that you only have to specify a handful of graphic effect settings and most of the work is done for you. The not so great news is that you can’t really specify the formatting in each individual Quick Style gallery position. The best way to control the look of the styles in specific gallery positions is to apply a style to see which theme effect elements (i.e., line, fill, and effect settings) are included in that style and then alter those specific effects in the theme’s XML. However, if you alter settings to control the style in a given gallery position, be sure to review any other graphic Quick Style galleries that you may need to use in your theme to ensure that your changes don’t have an unwanted impact in other galleries.

Important: When customizing theme effects, note that the subtle, moderate, and intense effects don’t always work as a set. In fact, they’re mixed and matched much more often than they appear together in Quick Style galleries. So, a given quick style may combine subtle fill with moderate line and effects or moderate effects with intense fill — even if the style name uses the term subtle, moderate, or intense. It’s important to look at how your customized theme effects manifest in the various Quick Style galleries to make certain that you’re happy with the results.

Tips:

·         To quickly review the look of quick styles throughout a gallery, just create one example of the type of graphic for which you want to review styles. Then, select the graphic and point to each quick style throughout the applicable gallery (such as SmartArt Styles). Remember that the 2007 Office release has the Live Preview feature, so you don’t even need to apply formatting to see how it will look on your graphics.

·         Though you can only edit theme effects in the theme file’s XML, you don’t have to write the XML from scratch. Try, for example, formatting a shape with the settings you want to include in your theme effects and then copying those effects from the XML of the document containing your shape into the XML for your theme.

·         Keep in mind that you also get more formatting flexibility when you customize some types of formatting using Office Open XML. For example, you may notice that certain picture styles have shadows that you can’t match exactly through the Shadow tab of the Format Picture dialog box, because the shadows use settings not available from within Word, Excel, or PowerPoint. Similar to the added flexibility you can often find when you use VBA to accomplish Word, Excel, or PowerPoint tasks unavailable from within the program’s user interface, you may find added flexibility when you know how to customize formatting through Office Open XML.

Understanding the Background Styles gallery

When you look at the Background Styles gallery in PowerPoint, you see twelve styles, right? Not exactly. Actually, you see four versions each of three styles—subtle, moderate, and intense. The styles on the top row are the subtle styles, middle are moderate, and bottom are intense.

In the XML file that stores theme information, you can specify three types of backgrounds, selecting from solid, gradient, or image fills. For each of those three background types, you have the further option to recolor the background in each of the four text\background colors that are part of a theme colors set (that is, light 1, light 2, dark 1, and dark 2).

Learning How to Edit a Theme’s XML

If you don’t yet have experience with the basics of Office Open XML, I recommend getting the essentials down first. Office Open XML is much easier to learn than you might expect, particularly for advanced Microsoft Office users, because it’s built around the features of the Office programs that you already know. Find resources to help you get started with Office Open XML, including articles, webcasts, and my book for the 2007 Office release, in the section that follows.

If you already know the basics of working with Office Open XML, one of the easiest ways to get to know the XML behind document themes is to learn by example. For example, when I wanted to learn how to use a textured fill in theme effects, I made a copy of the built-in Paper theme’s .thmx file and explored the contents of its ZIP package. By default, find the built-in document themes in C:\Program Files\Microsoft Office\Document Themes 12. Font, color, and effects settings for the theme are stored in a file named theme1.xml. To find that file, open the theme folder inside the theme’s ZIP package and then open the theme subfolder that resides inside that folder.

Additional Resources

Theme Basics

Apply or Customize a Document Theme (Microsoft Office Online How-To Article)

Apply your brand to Office documents with themes (Microsoft Office Online Demo)

Beyond the Ribbon: Create better documents using the 2007 Office release (Microsoft At Work Article)

Office Open XML Essentials

Advanced Tips & Tricks: Breaking Into Your Office Open XML Format Documents (Microsoft Office System Webcast)

Advanced Microsoft Office Document 2007 Edition Inside Out (book)

Office Developer Center

Brian Jones: Office XML Formats (blog)

Doug Mahugh: Open XML File Formats (blog)

Click to rate this article.

Go up to the top of this page.
This site powered by the Logical Web Publisher™: Content management by Logical Expressions, Inc.