Chart templates solve the old problem of having to send out copy-and-paste samples of graphs. But they only display the first 6 of the chart template colors you designed.
Adding More Colors
The most common application of chart templates is to overcome the design limitation of having only a 6-color palette to work with. I wrote about this problem years ago: Office Charts: 6 Colors Maximum! – Best Practices. After a chart uses Accents 1 to 6, it starts recycling those same 6 colors with automatically generated darker and lighter variations. Banks and wealth management clients often need many more than 6 data series in their charts, but still want to have colors that are on-brand and designed.
To create a wider range of data series colors, create a chart with the maximum number of data series that the client requires. Our record is 25 colors! Then right-click on the chart edge and choose Save as Template. This captures the formatting of the sample that you’ve created.
Your template will work just fine on charts that have already been created. Select the chart, choose Change Chart Type (yes, even if it’s the right type already), click on the Templates icon, select the chart template and click on Apply. Easy peasy, job done!
The New Chart Problem
But this process breaks down if you try to create a new chart from that template. Choose Insert>Chart, click on Templates, and select the chart type. Then start inputting data. As soon as you get past the 6th color, Office starts using those damn Microsoft default darker and lighter variations instead of the colors you set! This is Authoritarian Helpfulness at its worst!
Yes, you can fix this. Reapply the template by choosing Change Chart Type>Templates and reselecting the template. The colors are corrected to the design specs. But you shouldn’t have to do this! And now that you’ve found this article, you don’t have to.
Understanding Chart Template Colors
Let me back up a bit, and explain how chart templates are structured. The top level of the XML consists of [Content_Types].xml, a _rels folder for documenting the relationships of XML parts and a chart folder holding the good bits.
Inside the chart folder, we find chart.xml, which holds most of the formatting that we created when we made the custom chart. Chart.xml contains definitions that contain the intended series color. The colors in chart.xml get set when you save the file as a chart template, and they get used when you apply the template to an existing table. But they are not used when you create a new chart.
Each series is numbered starting with 0, so this is the series for the 7th color. For the first six, the color is set to an accent color. Starting with the 7th, the color fills are in RGB/hexadecimal. Here’s a sample:
In addition, there are subfolders for charts, media, theme, and _rels. The media folder only holds a BMP file that is used for thumbnail display in Office 2007 and 2010, but not in later versions. The _rels folder is for relationships of XML parts. The theme folder contains themeOverride1.xml. As the name suggests, this is a theme that overrides the theme of an Office file that hosts it. This allows you to use a chart template in any Office document while retaining the original design appearance. Finally, we have the charts folder, which has the XML part we’re looking for.
This folder contains 2 files: style1.xml, containing the formatting for all the chart parts and colors1.xml, with a list of default fill colors and transforms fo apply to those colors. Colors1.xml is the file that supplies the colors when a new chart is created from the template. Here’s what colors1.xml looks like:
On a newly inserted chart, an Office program will use the 6 colors in turn. Then it will cycle through them again, applying the a:lumMod val=”60000″ transform. LumMod modifies the luminance, turning each accent color to a dark version. The chart will follow this pattern instead of using the colors you designed for the extra data series. If you reapply the chart type to the chart, then it will update with your designed colors from chart.xml
Fixing Chart Template Colors
My first step was to read the Microsoft specs for cs:colorStyle. Under section 2.8.3.2 CT_ColorStyle, it reads: “The total set of colors is all contained colors repeated each time with each variation applied. A color style can contain 6 colors and 7 variations. This yields a total of 42 colors with the first 6 having the first variation applied, the second 6 having the second variation applied and so on.” Not promising, we really need more than 6 colors here.
After many fruitless experiments, I decided to see if I could add extra colors anyway:
To my astonishment, it worked! I could create a new chart and insert 10 dataseries with each displaying the designed color. No need to reapply the template! Who would ever have dreamt that Microsoft documentation has a mistake in it! ;-D
The takeaway is that to create a many-colored chart template that works as expected under all circumstances, you need to set the extra color values manually in colors1.xml.
Unlike PowerPoint, Microsoft Word has a utility to create custom Word table styles. You might think this makes life a lot easier, but you would be wrong. The Word utility has quirks and bugs, and Word tables don’t work the same way as PowerPoint’s. Using the Table Style dialog is not intuitive. To get a Word table style to work exactly to the way it should, you may have to hack the OOXML.
To start, let’s clarify that a table style is one of 4 styles that you can create in Word. The others are paragraph, character and list styles. A well-constructed table style does not need to have paragraph styles applied to it later. That’s because it already contains paragraph styles, though these don’t have the conventional names that you’re familiar with. Here’s how to get the best possible results.
Start with a similar table style
The first step in creating a custom table style is to insert a table, so the Table Design tab appears. By default, a new table will use the Table Grid style, which is very plain. If your final table style requires design options like a distinctive first column or a total Row, Table Grid is a poor place to start. It doesn’t include any of those options, and adding them back in is difficult. Switch the style to a Microsoft default that already has similar features.
Next, expand the table style gallery dropdown again and select New Table Style at the bottom. This ensures that your table style will appear in a new Custom row right at the top of the styles gallery. By contrast, starting with Modify Table Style lumps your style in with all the Microsoft defaults.
Base the new style on the chosen one
When you choose Table Design>Table Styles>New Table Style, Word sets the Style based on dropdown to Table Normal, not the style you chose. If you originally chose Grid Table 5 Dark, then set Style based on to the Grid Table 5 Dark. (Current versions of Word for Mac have a display bug whereby choosing a different table style does not update the preview in the dialog. Choose the style, OK out, then choose Modify Table Style to see a corrected preview.)
Start with Whole table
Start with the Whole table choice in the Apply formatting to dropdown. This is the default cell formatting that will appear when no other Table Style Options are applied. The formatting controls are condensed, here’s a breakdown of which control does what:
If the formatting control you need doesn’t appear in the dialog, use the Format dropdown in the lower left corner to access more of them.
Move on to Header row
After you’ve set the default cell style, choose Header row from the Apply formatting to dropdown. This is where the dialog gets buggy. Many of the controls will retain their value from whatever table part you were previously editing! The controls will sometimes, but not always, display the values used in the new table part you have just selected (in this case, Header row)! So it’s up to you to keep track of what the correct values are for the table part you’re formatting, and apply each in turn.
Format each table part in order
Because of the dialog display inconsistencies, it’s easiest to format each table part in the order they show in the Apply formatting to dropdown.
As you format each table part, Word creates, in effect, a separate paragraph style for each table part. But you don’t apply these styles by choosing a style name. Instead, you check a box in the Table Style Options group of the Table Design tab. Checking the Header Row option automatically applies the Header Row style to the top row of the selected table. When you’re creating a table style for a client, this means many design options can be included in one table style, and you don’t have to include elaborate instructions about which style to manually apply to which table part.
What about the corner cells?
The last 4 items on the Apply formatting to dropdown are to format the top left, top right, bottom left and bottom right corner cells. But there is no Table Style Option to turn these on and off directly. The way Word handles this is that if both the Header Row and First Column options are checked, then the formatting for the top left corner cell is turned on. This formatting can be different from either the header row or the first column. Header Row plus Last Column will turn on the upper right cell. You get the idea.
FWIW, PowerPoint table styles can also have corner cell formatting and the cell formatting is applied in the same way, by using pairs of style options.
Word Table Style Quirks
There are some oddities about Word table styles, and a few bugs. One oddity is that table text is based on the Normal style in relationship to Word’s Default Text settings. If Normal has been set to any color other than Automatic, applying different text colors to different table parts will have no effect. The text will remain the color set for Normal. You then have to apply new paragraph styles to the table parts after creating the table.
Another weird result of the dependency on Normal is that Word expects to have the default line spacing for your version of Word. As I write, Word 365’s default Normal style has a Line spacing of Multiple at 1.08 with Space After of 8 points. In a table style, this gets automatically reinterpreted as Single with 0 before and after. Centered vertical spacing then works as expected. If you change the Normal line spacing to a larger or smaller value, text that is nominally vertically centered will actually sit higher or lower in the cell. If you add 12pt after, the table text will jump from being vertically centered to having 12 pt after, a huge difference. Microsoft doesn’t publish any of this information. Surprise!
This is one of the reasons why Word experts recommend that Normal style should stay as is and not be actually used in a document unless the default formatting matches the needs of the design. Better to format all text as Body Text style and give that style the custom color and line spacing.
But what if you’re given a template that already has a non-standard Normal, and the client asks for a table style? All is not lost. Table styles can still work as designed if you are using Word for Windows (sorry, Mac people). The trick here is to set the document text defaults to the same values as the revised Normal style. (Thanks to MVP Stefan Blom for this tip.) Here’s how to do this:
With the document or template open in Word, click on the Styles pane dialog opener below the Quick Styles gallery, or press Alt + Ctrl + Shift + s at the same time. The Style pane opens.
Click on the Manage Style button at the bottom.
Select the Set Defaults tab.
Set the defaults to the same values as Normal style: same font, size, color and paragraph settings. OK out.
You’ll know you got it right when you insert a table in the new style and it automatically has the correct styling for header row, first column and the other table style options. It is no longer necessary to apply text styles to the table, you can simply turn the Table Design>Table Style Options on and off to affect the related table area.
Word Table Style Bugs
Lousy User Interface Design
In the table style dialog, color dropdowns remain set at the color last chosen, even if that was for a different table part. The dropdown should update to the color currently in use for the table part that has been selected. This is just common-sense UI design.
The interface for setting border styles is pretty bad. It’s almost impossible to set one color for vertical borders and a different one for horizontal borders. All borders switch to the last selected color. But we can fix this with an OOXML hack (see below).
Defective Override Capabilities
Subsequent parts can’t always override the XML of earlier parts. As an example, set the Whole table to have internal vertical rules. Then set the first column to have no rule on the right. This should make the vertical rule separating the first column from the second column disappear, but it doesn’t. The rule has to be manually removed after the table is created.
Non-Functional OOXML Tags
The Paragraph Properties (w:pPr) element for each table part has a pStyle attribute that is supposed to set the paragraph style for that part. It does nothing. As mentioned above, the style is always derived from Normal style.
Format the Word table style options in order.
Start by formatting the Whole table section with the defaults for cell in the middle of the preview. Most of the time, this will include the font size and color, and the table background color and any rules that are to appear if banded rows are turned off. If you can’t get the formatting you need from the few controls on the dialog, click on the Format dropdown to find detailed access to Table Properties, Borders and Shading, Banding, Font and Paragraph attributes. Under Windows, you’ll also see a Text Effects choice, which is of dubious value in a table.
Then move on to Header Row formatting, the next item on the Apply formatting to dropdown. Format each item on that dropdown until you have set all the properties you need. After you get all formatting set, apply the custom style to the sample table you created at the beginning. Then use Modify Table Style for any tweaks required.
Word Table Style Hacks
Default style formatting is hardcoded in Word. So the styles that get stored in a Word file are only styles that have been modified or newly created in the document. All of the style exceptions and new style definitions are stored in the word/styles.xml part. Here’s the OOXML for a full table style. First, the section that formats the whole table. Pr stands for Property. tbl is Table, tc is Table Cell, p is Paragraph and r is Run (any length of text less that a paragraph).
(Above) The w:rPr section sets the default text while w:tblPr sets the borders. This table is transparent when all design options are turned off, so there is no fill. Note the entries for w:insideH and w:insideV. I had to hack this XML to get different colors for the inside horizontal and inside vertical borders.
(Below) Next is the formatting for the header row. w:rPr sets the text as bold and white, while w:tcPr sets the cell borders to nothing and the fill to Accent 2.
(Above) The previous section formats the Total Row, removing the borders. There’s another hack here: the w:shd illustrates how to set the fill as No Color, with both w:color and w:fill set to auto.
(Below) Next up is the First Column formatting. w:pPr sets the text flush right, w:rPr makes it bold and w:tcPr removes the borders and keeps the fill No Color. Oddly, while w:insideH successfully overrides the internal horizontal rules set in the Whole Table section, neither w:right nor w:insideV are able to remove the internal vertical rule to the right of the column. This works as expected in a PowerPoint table style, but is broken in Word.
(Above) The right-most table column is formatted with no borders and no fill.
(Below) If your design includes banded columns, the table style will include a section like this. There is just a definition for odd columns: even columns would be formatted with the defaults from the Whole Table section. If the First Column option is turned off, odd columns start at the left-most column. If First Column is turned on, all columns shift and the column just to the right of the first column takes on odd column formatting.
(Below) Formatting for the 4 corner cells. These are only activated when both options that affect the cell are turned on. As an example, if the table has both a Header Row and a First Column, then the nwCell formatting is turned on. In the formatting for nwCell below, the text becomes flush right when both options are used.
If you base your Word table styles on a table other than Table Normal, that table style will be included in styles.xml. If that table style includes formatting that you don’t want to included in your table style, then delete the section in the style it’s based on. As an example, this style was based on Grid Table 3, which includes a last column and a total row. To remove all last column and total row formatting from your style, delete the corresponding XML sections in both your custom style and in the style on which it’s based. You’ll know when you’re succesful when turning the Last Column and Total Row Design Options on and off in Word has no visual effect on a sample table.
Too complicated? Shoot me a message and we’ll create custom Word table styles for your document or template.
Microsoft doesn’t have a catchy name for this feature, but I’ll try to describe it. In Word for Windows, you can select document text, then apply Read-only protection, but with Exceptions. By default, the exception is Everyone. If we untangle the word logic, this means that the document becomes read-only except that everyone can edit the selected text. It’s a far better solution than the old protection for forms.
When this type of protection is applied, the selected areas become shaded in light yellow as a visual cue that the highlighted text remains editable. Users of Word 2016 for Mac and 2019 for Mac (including Microsoft 365 subscribers) can use these documents, but can’t produce them. At least, until now.
Word pros will look at the square bracket and think it’s a bookmark. It’s not. Microsoft reused the bookmark character to show a Permission Range. To add these editable ranges on a Mac, we’re going to create one manually.
To start, apply Read-only protection to the document. Use Tools>Protect Document, then check Protect document for. Click on Read only, then on OK. Save the file.
Now open the file in your XML editor. OOXML Tools in the Chrome browser is fine for this job. Open document.xml inside the word folder.
Just before the text that you want to be editable, insert a line like this:
The beginning and end tag must have the same 9-digit random number. Each pair of tags in a document must have a different random number.
Here is a whole paragraph marked as editable:
<w:permStart w:id="783447734" w:edGrp="everyone"/>
<w:p w14:paraId="5B68C6A9">
<w:r>
<w:t>To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other.</w:t>
</w:r>
</w:p>
<w:permEnd w:id="783447734"/>
It’s that simple. Save the file and distribute to users.
For any of our tips that seem too complicated, Brandwares is available to do it for you. We teach the pros!
Fix It with VBA
Instead of hand-editing the XML, then applying Read-only protection, you can use a bit of VBA to solve this problem. Select the text that should remain editable, then run this macro:
Sub CreatePAE()
Selection.Editors.Add wdEditorEveryone
ActiveDocument.Protect Password:="", NoReset:=False, Type:=wdAllowOnlyReading, UseIRM:=False, EnforceStyleLock:=False
End Sub
If you have multiple areas that should remain editable, run the macro, then unprotect the document (Tools>Protect Document>Uncheck Protect document for option), select new text, then re-run the macro. Leave the document protected before distributing it.
The Best Practice is to NOT use Text Effects in Office. Ever.
That could have been my shortest article ever, but I guess I should explain the reasons. I’m referring to the graduated fills and lines, the glows, reflections, shadows and 3-D effects you can add to text. In the past these effects have caused some problems with ordinary shapes, but with text, they’re a disaster.
Clearly, it’s not enough for most users that these effects are visually hideous. That just a natural result of the low value we assign to arts education. In many years of working with competent graphic artists, I’ve never been asked to create any template that uses these effects. Designers understand the need for restraint, users don’t. And so we get the appalling appearance of most Word and PowerPoint documents.
But the functional problem with these effects is how they affect PDFs created from Word, PowerPoint and Excel. Microsoft has no clue how to export true PostScript of the fancy effects. So they adopt a simplistic approach: flatten them to graphics. Unfortunately, this means the text vanishes, leaving behind only a pretty picture. Well, not even that. All kinds of PDF functions are impaired: Text to speech is impossible, accessibility goes right out the window, reimporting the PDF to Office is brain-dead.
I tested PDFs created in 3 ways: saving to PDF in Office, printing to Acrobat and printing to the Microsoft Print to PDF print driver that comes with Windows 10. When saving to PDF, all text with applied effects was flattened. When printing to either Acrobat or Microsoft Print to PDF, Gradient Fills, Gradient Lines and 3D Effects were flattened, while Shadows, Reflections and Glows remained as live text.
The moral is clear: when the client asks for Text Effects, just say NO!
There are more AutoShapes in Office than appear in the user interface. Over time, Microsoft has quietly added to the collection stored in Office. Many of the more recent shapes are used in SmartArt files, while others have no current use that I can detect. But for anyone who hacks XML or codes VBA will find this week’s download or every autoshape a useful reference.
These are all the shapes that can be used in a piece of SmartArt. This is a deep topic: SmartArt XML is a programming language with a Frankenstein syntax. But the starting point for any language is to get the names right. SmartArt and VBA both reference the AutoShapes collection in Office, but they use different names for the same objects. Many of the same shapes are seen in the Shapes dropdown of Office programs, but those names are also different. The main source of the VBA names are from this page: MsoAutoShapeType enumeration (Office), while the XML names come from this out-of-date listing: SmartArt AutoShapes.
So, for my own sanity, I created a Word document showing an example of each shape, along with it’s name in XML, in VBA and in the user interface. This has smoothed out my workflow, and it may help you as well.
For any non-interface shapes, you can insert them into a document with code analogous to this. For PowerPoint:
Sub MakeShape()
ActivePresentation.Slides(1).Shapes.AddShape msoShapeTrapezoid, 24, 24, 144, 144
End Sub
Change the bolded word to the shape name in the VBA MsoShapeType Name column.
Some shapes have specialized VBA commands, like callouts:
Sub MakeShape()
ActivePresentation.Slides(1).Shapes.AddCallout msoCalloutTwo, 24, 24, 144, 144
End Sub
Callouts led me to a discovery about legacy versions. msoCalloutOne gives exactly the same result as msoCalloutTwo in current versions of Office.That seemed odd, so I ran the same macro in PowerPoint 2003 (I still have it installed for its macro recorder). In that version, msoCalloutOne creates a callout with a vertical leading line that can be moved up and down, but not at an angle. Presumably, MS found that useless and deprecated it.
We’re proud to be hosting a free e-book Open XML Explained. Finding readable explanations of how Office Open XML works isn’t easy. Outside of the very dense published ECMA standards, most of the information exists only on the web in help pages and blog posts. Back in 2007, a developer in the Netherlands, Wouter van Vugt, published a well written PDF that goes into details about the XML formats used in Word, Excel and PowerPoint. This was originally posted on the openxmldeveloper.org website run by OOXML genius Eric White.
Eric’s site closed down some years ago and much of the content disappeared. But I’ve been able to track down a copy of Wouter’s book and have his permission to give it a new home here at Brandwares. Download Open XML Explained.
The e-book covers Excel, Word and PowerPoint in depth, covering otherwise obscure topics like table formatting, bullets and charts. It’s an excellent companion to my book, covering the theory behind my practical techniques. OOXML hackers will appreciate the explanations of all the major XML parts in an Office file, while coders will find this a useful resource in learning how to programmatically create and modify documents, workbooks and presentations.
I should note that Open XML Explained was written in 2007, so while it covers all the OOXML basics, it doesn’t have any information about newer features like the Backstage or SuperThemes. Reader David Wiggins was kind enough to find the sample files that accomapied the book. The download page has a link to them as well. Enjoy!
SOLD OUT! The paper copies of the book are all gone, but the ebook version (with an additional 40 pages of new content) is available here.
After years of original research, you can finally buy the book! Filled with unique information not found anywhere else, online or in print, this manual shows you how to build SuperThemes 3 different ways, how to create custom Effects Themes, how to edit the Ribbon in macOS, and much more!
The book expands on many of the brief articles on this site, putting them in logical order and expanding the number of examples. Author John Korchok explains how Office Open XML files work, shows you where to find each XML part and how each part can be modified. With these tools, you can provide unique services to your clients or users that you can’t find at the average Office template service bureau. To give you a better idea of what it covers, here is the Table of Contents:
All techniques are covered in both Windows and macOS. The book includes a link to a downloadable text file with all the hyperlinks, XML and VBA listings, so you don’t have to retype anything from the printed page. At this time, only print copies are available, ebook versions will be here in several months. To buy the book, click here.
A client sent a design for a Word template that had lots of boxes and photos with uniform rounded corners. Not an unreasonable request, but Office doesn’t do that well. In PowerPoint, Word and Excel, rounded corners are proportional to the size of the shape. Making them uniform manually is picky and time-consuming. But with a dash of VBA, we can make the job easy.
The Math
As a round-cornered shape gets larger, the corner radius increases as well, in proportion to the length of the shortest side of the shape. Since we want to keep the radius the same size, we need to create a formula that makes a smaller number as the shorter side increases. We need an inverse number! We can create this by dividing the preferred corner radius by the short side size. And you thought you’d never need that high school math!
Here’s VBA code that will work in Excel, Word and PowerPoint on selected round-cornered boxes. Thanks to the Rembrandt Kuipers and Ernst Mathys who have commented below, this macro has been improved since it was originally published. Replace the number after sngRadius with your desired radius size in points.
Sub RoundedCornersFixedRadius()
Dim oShape As Shape
Dim sngRadius As Single
sngRadius = 8.50394 'Radius size in points. 8.50394pt is equal to 3mm.
For Each oShape In ActiveWindow.Selection.ShapeRange
With oShape
If .AutoShapeType = msoShapeRoundedRectangle Then
LengthOfShortSide = IIf(.Width > .Height, .Height, .Width)
.Adjustments(1) = sngRadius / LengthOfShortSide
End If
End With
Next oShape
End Sub
To set rounded corners on a PowerPoint placeholder, open Slide Master view, select the placeholder and run the above macro.
Uniform Rounded Corners for the Whole Document
To run this on a whole presentation, document or workbook, we need to customize the routine for each Office program. Here’s the Excel version:
Sub RoundAllXLCorners()
Dim oWorksheet As Worksheet, oShape As Shape, sngRadius As Single
sngRadius = 8.50394 'Radius size in points.
For Each oWorksheet In ActiveWorkbook.Worksheets
For Each oShape In oWorksheet.Shapes
With oShape
If .AutoShapeType = msoShapeRoundedRectangle Then
LengthOfShortSide = IIf(.Width > .Height, .Height, .Width)
.Adjustments(1) = sngRadius / LengthOfShortSide
End If
End With
Next oShape
Next oWorksheet
End Sub
To do the same in PowerPoint
Sub RoundAllPPCorners()
Dim oSlide As Slide, oShape As Shape, sngRadius As Single
sngRadius = 8.50394 'Radius size in points.
For Each oSlide In ActivePresentation.Slides
For Each oShape In oSlide.Shapes
With oShape
If .AutoShapeType = msoShapeRoundedRectangle Then
LengthOfShortSide = IIf(.Width > .Height, .Height, .Width)
.Adjustments(1) = sngRadius / LengthOfShortSide
End If
End With
Next oShape
Next oSlide
End Sub
And finally, for Word
Sub RoundAllWDCorners()
Dim oShape As Shape, sngRadius As Single
sngRadius = 8.50394 'Radius size in points.
For Each oShape In ActiveDocument.Shapes
With oShape
If .AutoShapeType = msoShapeRoundedRectangle Then
LengthOfShortSide = IIf(.Width > .Height, .Height, .Width)
.Adjustments(1) = sngRadius / LengthOfShortSide
End If
End With
Next oShape
End Sub
The Word version is a little simpler because a Word document is one big object, while Excel and PowerPoint both have multiple objects for each worksheet and slide, respectively. But the similarites point out that when you’re searching online for VBA code, finding something for a different program and modifying it can be a huge time-saver. By far, Excel has way more code written for it, so Excel VBA sites can be a fruitful source for Word and PowerPoint code ideas.
These macros have been tested under both Windows and macOS and work well under both.
To use these macros with other shapes, please see my article Every AutoShape – Cool Code for a downloadable reference file showing all AutoShapes along with their XML and VBA names. Then replace msoShapeRoundedRectangle with the mso shape name you need.
June 2023 Update: I’ve created a VBA add-in for Word for Mac that allows you to more easily add Content Controls in Word documents, with an interface similar to the Windows version. I’m looking for beta testers for this add-in. If you have time to test, please email me (my address is in the Meet the Author sidebar).
Content Controls are an improved form of fillable form field, but the Word for Mac user interface doesn’t include Content Controls for macOS. I show you how to sidestep this limitation to be able to create superior fillable forms.
Microsoft Word for Windows has three different types of fields to use for fillable forms. The oldest of these are Legacy Form Fields, which exist in every version of Word, Windows and Mac, but not DOS, back to the dawn of time. Legacy form fields require the document to be protected for forms, which closes down many formatting options even on unprotected sections. These are the only form fields available in the Mac program interface. Windows version also have ActiveX controls. These generally have a crude appearance. They don’t work at all on Mac versions of Word.
Finally, we have the newest type of form fields, Content Controls. These were introduced on Windows in Word 2007. The collection of controls was expanded a little in 2010 and a little more in 2013. Word 2008 and 2011 can’t use or create them, but in Word 2016 for Mac, the program started honoring Content Controls created in Windows, so they work as expected on both platforms. Unfortunately, the tools to add and modify them are still not in the program.
Please note: A known error occurs if you try to insert a Content Control into an old Word file in .doc format. You’ll see an error like Run-time error 445: Object doesn’t support this action. Update the file to .docx format to fix the issue.
Content Controls for macOS: What Are They?
While Legacy Form Fields have only 3 types (Text field, Checkbox and Dropdown), there are 9 (or 10, depending on how you count) types of Content Controls. Here’s a look at each type:
These look identical on the screen. The screen shot shows what they look like unselected (top) and selected (bottom). The Plain Text control is most similar to the Legacy Text form field. All the text has the same formatting and you can’t include other types of content other than text. By comparision, the Rich Text control allows selected text to be bold or italic or a different font. You can insert tables and pictures and even other Content Controls into Rich Text controls.
Finally! A true picture placeholder for Word! The picture can be set when the control is created. There are options to allow the user to replace it or not. Or it can be left blank (as shown) for the user to add a picture later. You can change the shape from a square using Picture Format>Picture Styles. This choice can also add a soft edge or other visual effects to a photo that the user inserts later.
It’s worth noting that Picture Content Controls only work as inline pictures. To float them and wrap text around them, you need to place the CC in a table cell or frame or some other object that allows text wrapping. These controls come in at 2″ square, but you can set numeric dimensions on the Picture Format tab. (Thanks to Timothy Rylatt for the tips!)
This is the only Content Control that doesn’t work yet on a Mac. While Building Blocks in the Windows version of Word is the same technology as AutoText on the Mac, Microsoft hasn’t gone the extra mile to make it work on a Mac. The macro further down the page sets the control to work with AutoText (as you almost always should if your template is being distributed to others). But when you click on the control’s AutoText tab, a dropdown list of AutoText entries doesn’t appear like it does in the Windows version.
At least if your Windows client needs it in their template, you can create it on a Mac. AutoText works by grabbing content from the active document’s attached template. If you’re sending a template with AutoText content, the Content Control will find that. If you’re sending a document instead of a template, the Content Control will grab AutoText from the user’s Normal.dotm file.
Similar to the Legacy Check Box form field, but with the added advantage that the filled symbol can be set to other symbols than an X. This control was added in Word 2010, so don’t include one for a client using 2007.
But still no radio buttons? Give me a break, Microsoft! Using elaborate VBA kludges, it’s possible to make a set of checkboxes operate like radio buttons with both Legacy and Content Control versions. But it shouldn’t be so hard!
Another similar pair of controls. The Drop-Down is most similar to the Legacy Drop-Down (which MS often refers to as a Combo Box, just to confuse everyone). The Drop-Down restricts users to choosing an item on the list, while a Combo Box allows a user to enter a value that is not on the list.
While Legacy Text fields have a date option, it’s only to enforce date formatting after a user tries to enter a date. The Date Picker Content Control is way cooler, it’s pops a little calendar for the user to choose a date visually. Handy!
…And the prize for longest prompt text goes to this control. Added to Word 2013, so it won’t work for 2007 and 2010 clients. Clicking on the plus sign in the bottom right corner duplicates the content. There are already a couple of ways to do this, so I think this is strictly for user convenience. Unlike the others, this control spans the page by default, probably because of the long prompt.
No screen capture for this one, because it’s more of an operation than a control. Applying this to a selected set of Content Controls will group them together, so they can be copied as a unit. You can’t include a Rich Text control, which can also be used as a group. If you select controls, then get an error when grouping that a control is “partially covered”, it will usually be about the topmost control. Add a carriage return before, include it when you select, then run the Group macro.
Simple Controls from Keyboard shortcuts
Fortunately, the VBA object model for Word 2016 and 2019 for Mac includes Content Controls. If you’re creating forms for your own use, there is a simple way to create basic Content Controls on your Mac:
In Word, choose Tools>Customize Keyboard
Scroll Categories and pick All Commands
Scroll Commands and pick ContentControlCheckBox
Click inside the Press new keyboard shortcut field and type a key combination. Word will inform you if that combination is already in use. If there is no conflict, or an insignificant conflict, click on the Assign button. Finally, click on OK. The Control key is a good modifier, because all existing keyboard shortcuts with Control are duplicates of ones that also use the Command key.
Click on your document where you would like to see a checkbox, then use the keyboard shortcut. Viola! Instant checkbox!
Repeat the steps for the other Content Control commands. It’s not a bad idea to make a sample document with Content Controls and their shortcuts, for later reference. BTW, keyboard shortcuts are the only customization that can access Content Controls. Equivalent commands for the QAT and Ribbon haven’t been added as of this writing.
Content Controls for macOS: Complex Controls for Clients
The keyboard shortcuts are fine for plain vanilla controls. But they’re so basic, some are useless. Sure you can insert a Drop-Down or Combo Box, but they don’t have any items in the list and there’s no easy way to add them. What we need is more fine-grained control so we can set all the same options that a Windows user can. This is possible by inserting them using VBA.
If you never used macros in Word, start by making the Developer tab visible on the Ribbon. Choose Word>Preferences>View and check Show developer tab. The tab becomes visible when you close the Prefs panel.
On the Developer tab, click on the Visual Basic button (Word doesn’t run Visual Basic, but a very similar language called Visual Basic for Applications. This is VBA, not VB, but why would MS care about an accurate button title?). The VBA Editor opens. In the top left corner is a windows called Projects. If you have a fresh installation, you’ll only see Normal here. If you have Add-ins installed, there will be other project names. Select Normal.
From the macOS menu, choose Insert>Module. Call it ContentControls. A new module page is opened where you can insert macro code. Copy and paste the following code onto that page:
Sub AddRichTextCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlRichText, Selection.Range)
Set oCC = Nothing
End Sub
Sub AddPlainTextCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlText, Selection.Range)
With oCC
.MultiLine = True
End With
Set oCC = Nothing
End Sub
Sub AddPictureCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlPicture, Selection.Range)
Set oCC = Nothing
End Sub
Sub AddBuildingBlockCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlBuildingBlockGallery, Selection.Range)
With oCC
.BuildingBlockType = wdTypeAutoText
.BuildingBlockCategory = "General"
End With
Set oCC = Nothing
End Sub
Sub AddCheckBoxCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlCheckBox, Selection.Range)
With oCC
.Checked = False
.SetCheckedSymbol CharacterNumber:=&HFE, Font:="Wingdings"
.SetUncheckedSymbol CharacterNumber:=&HA8, Font:="Wingdings"
End With
Set oCC = Nothing
End Sub
Sub AddComboBoxCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlComboBox, Selection.Range)
With oCC
.DropdownListEntries.Add "Choose an item.", value:=""
.DropdownListEntries.Add "Item 1"
.DropdownListEntries.Add "Item 2"
End With
Set oCC = Nothing
End Sub
Sub AddDropDownCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlDropdownList, Selection.Range)
With oCC
.DropdownListEntries.Add "Choose an item.", value:=""
.DropdownListEntries.Add "Item 1"
.DropdownListEntries.Add "Item 2"
End With
Set oCC = Nothing
End Sub
Sub AddDatePickerCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlDate, Selection.Range)
With oCC
.DateDisplayFormat = "MMMM d, yyyy"
.DateDisplayLocale = wdEnglishUS
.DateCalendarType = wdCalendarWestern
End With
Set oCC = Nothing
End Sub
Sub AddRepeatingSectionCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlRepeatingSection, Selection.Range)
With oCC
.AllowInsertDeleteSection = True
.RepeatingSectionItemTitle = "Repeating Section Item"
End With
Set oCC = Nothing
End Sub
Sub AddGroupCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlGroup, Selection.Range)
Set oCC = Nothing
End Sub
Use the Tools>Customize Keyboard command to assign these macros keyboard shortcuts. You can also add them to the Quick Access Toolbar. If you subscribe to Office 365 or have Office 2019, you can also add them to the Ribbon.
If you take a close look at the code, you’ll see there are additional lines on some that allow you to set options for that type of control. As one example, the Date Picker includes options for the calendar type, date format and date language. In use, you would alter these options to suit the client, then run the macro to add a control with those options set.
Content Controls for macOS: Setting the Options
Here’s where you can really customize the Content Controls. These are generic options that can be set for all Content Controls. Rather than bulk up each individual macro, here’s one macro to set the extra options. Set the options in code, select a Content Control that you’ve already inserted, then run the macro. If you’re inserting many controls that have a common setting, like .LockControl = True, add that line to the code for inserting the control to avoid extra steps.
Sub SetOptions()
If Selection.Information(wdInContentControl) Then
With Selection.ParentContentControl
'Sets the appearance to the original bounding box look. For the newer tags look, use wdContentControlTags
'If you don't need to change a setting, comment it out before running the macro
.Appearance = wdContentControlBoundingBox
'Sets the color of the control to a preset color
.Color = wdColorWhite
'Sets the Word Character style to use for the text formatting. This will fail if you use a Paragraph style or forget to create the style before running this. This does _not_ change the placeholder text appearance, just the entered text that replaces it.
.DefaultTextStyle = "Big"
'Sets whether the Content Control can be deleted or not. If the control has had .Temporary = True applied, you must reverse that property to True before applying this.
.LockContentControl = True
'Sets whether the contents of the Content Control can be deleted or not.
.LockContents = False
'Sets the placeholder text or prompt for the control
.SetPlaceholderText , , "Default Text"
'Sets the Content Control tag property
.Tag = "Tag"
'If this is set to true, the Content Control will be removed when the contents are edited.
.Temporary = False
'Sets the title of the Content Control. This appears on a tab above the control when it is activated.
.Title = "Title"
End With
Else
MsgBox "Please select a Content Control to change its options."
End If
End Sub
Perhaps you need to create a date picker in a different language. Starting with the macro above for U.S. English dates, you can modify it to create a French date picker:
Sub AddFrenchDatePickerCC()
Dim oCC As ContentControl
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlDate, Selection.Range)
With oCC
.DateCalendarType = wdCalendarWestern
.DateDisplayFormat = "d MMMM yyyy"
.DateDisplayLocale = wdFrench
End With
Set oCC = Nothing
End Sub
Utility Macros
The following macros perform essential functions that may only be occasionally required. First, a pair to toggle all Content Controls between the older Bounding Box appearance and the newer Tags look. The only control that currently displays as a tag in macOS is the Group Content Control. All others appear as plain text in a mysterious field. As a consequence, don’t use this setting for forms to be used on a Mac. Save it for Windows clients:
Sub BoundingBoxAppearance() 'Sets all Content Controls in the document to a bounding box appearance
Dim oCC As ContentControl
For Each oCC In ActiveDocument.ContentControls
oCC.Appearance = wdContentControlBoundingBox
Next oCC
Set oCC = Nothing
End Sub
Sub TagAppearance() 'Sets all Content Controls in the document to the tag appearance.
Dim oCC As ContentControl
For Each oCC In ActiveDocument.ContentControls
oCC.Appearance = wdContentControlTags
Next oCC
Set oCC = Nothing
End Sub
This macro deletes the existing list of a Combo Box or Drop-Down and replaces it with a new list.
Sub ReviseComboBoxOrDropDownList()
If Selection.Information(wdInContentControl) Then
If Selection.ParentContentControl.Type = wdContentControlComboBox Or Selection.ParentContentControl.Type = wdContentControlDropdownList Then
With Selection.ParentContentControl
.DropdownListEntries.Clear
.DropdownListEntries.Add "Choose an item.", value:=""
.DropdownListEntries.Add Text:="List Item 1", value:="1"
.DropdownListEntries.Add Text:="List Item 2", value:="2"
End With
End If
Else
MsgBox "Please select a Combo Box or Drop-Down Content Control to change its list."
End If
End Sub
Finally, one to ungroup a Group Content Control. Switch to Tag view to see Groups, they’re invisble in Bounding Box view. Don’t try to select all group items before ungrouping, it will generate an error. Instead, single-click anywhere inside the group:
Sub UnGroupCC() 'Ungroups a group control
If Selection.Information(wdInContentControl) Then
Selection.ParentContentControl.Ungroup
End If
End Sub
Now you’re equipped to send your client top-quality fillable forms with the latest technology. So when your client asks if you can create Content Controls, instead of saying “Huh?”, you can reply confidently “No problem!”
Groups of workers usually use the same templates. But it can be time-consuming to keep everyone updated when templates are installed separately on each desktop. Instead, you can implement shared workgroup templates with a feature already built into Office.
Shared Workgroup Templates – Multiple Uses
Every desktop version of Office, Mac and Windows, includes a Workgroup templates option that allows you to set a network share as a templates folder. Templates on this share are instantly available to all users, making updates and revisions a breeze. Automatically, everyone in the office is using the same version. As long as template names remain identical, then old Word documents automatically attach themselves to the new template.
While you can only set the Workgroup Templates location in Word, once you make the change there, it also applies to PowerPoint and Excel.
The Workgroup templates network share can serve more that just templates. With some additional subfolders, it can be a source for Document Themes, including custom SuperThemes, it can hold collection of Font and Color themes. These additional files don’t show in the File>New dialog. Theme files display under the Themes dropdown, theme colors under the Colors dropdown and theme fonts under the Fonts dropdown.
Shared Workgroup Templates – Setup
To set up shared workgroup templates, first create the network location and ensure it’s accessible to all in the office without a signin. Each computer should connect to the share automatically on restart, so users don’t have to remember to manually connect before creating a new document. Create subfolders with the following names for othe file types you want to support. Document Themes for themes, with subfolders for Theme Colors and Theme Fonts. All versions of Office expect exactly the same file structure.
If the office uses Group Policies to install and configure software, you can use that feature to add the Workgroup Template location to each user installation. If you’re using “sneakernet” for configuration, here’s how to do it manually. All Office suites use a setting in Word to set the location for all the other programs
Office 2010, 2013, 2016 and 2019 for Windows
In Word, choose File>Options>Advanced.
Scroll down to the General section of Advanced and click on the File Locations… button.
Select the Workgroup templates line, then click on the Modify button.
In the dialog that opens, enter the path to the network share in the Folder name field, or use the window controls to navigate to the folder. Select the folder and click on OK. OK all the way out and close Word
Office 2007 for Windows
In Word, click on the Office button, then on Word Options, then on Advanced..
Scroll down to the General section of Advanced and click on the File Locations… button.
Select the Workgroup templates line, then click on the Modify button.
In the dialog that opens, enter the path to the network share in the Folder name field, or use the window controls to navigate to the folder. Select the folder and click on OK. OK all the way out and close Word.
Office 2003 and earlier for Windows
In Word, choose Tools>Options and click on the File Locations tab.
Select the Workgroup templates line, then click on the Modify button.
In the dialog that opens, enter the path to the network share in the Folder name field, or use the window controls to navigate to the folder. Select the folder and click on OK. OK all the way out and close Word.
Office 2016 and 2019 for Mac
In Word, choose Word>Preferences>File Locations.
Select the Workgroup templates line, then click on the Modify button.
In the dialog that opens, use the window controls to navigate to the folder. Select the folder and click on Open. OK out and close Word
Office 2011 and earlier for Mac
In Word, choose Word>Preferences>File Locations.
Select the Workgroup templates line, then click on the Modify button.
In the dialog that opens, use the window controls to navigate to the folder. Select the folder and click on Choose. OK out and close Word
Shared Workgroup Templates in Use
Here’s how to access Workgroup templates in Office programs
Office 2016 and 2019 for Windows
Choose File>New.
Click on Custom.
Click on Workgroup Templates, select a template, then click on Create.
Office 2013 for Windows
Choose FILE>New.
Click on SHARED.
Click on a template.
Office 2010 for Windows
Choose File>New>My Templates.
On the Personal Templates tab, select a template, then click on OK. This tab also shows local templates on the user’s computer.
Office 2007 for Windows
Click on the Office button, then on New.
Click on My templates…
Select the My Templates tab. Workgroup templates are displayed along with local templates in the same pane.
Office 2003 and earlier for Windows
Click on File>New. The New Document pane opens at the side of the window.
On the New Document pane, click on On my computer…
Select a template from the General pane and click on OK. This pane shows a mix of local and workgroup templates.
Office 2016 and 2019 for Mac
Choose File>New from Template…. The Document Gallery opens
In the upper left corner, click on the Work link. This link only appears when you have a Workgroup Templates location set in Preferences.
Select a template, then click on Create.
Office 2011 for Mac
Choose File>New from Template. The Document Gallery opens.
Click on Workgroup Templates in the left-hand TEMPLATES list..
Select a template and click on Choose.
Office 2008 for Mac
Choose File>Project Gallery. The Project Gallery opens.
Click on My Templates in the left-hand Category list..
Select a template and click on Open. This window will show a mix of Workgroup and local templates.
Shared Workgroup Templates – Shortcomings
In addition to templates and themes, a local templates folder also serves custom Chart and SmartArt templates. Neither of these formats is supported by Workgroup Templates, so those templates must still be installed locally on each user’s computer.
Free Control Control Add-in for Word for Mac
Subscribe to the Best Practices blog and get a free copy of our new Control Control add-in. This is the easiest way to create the same modern form controls that are in Word for Windows. Enter your real email and hit Subscribe in the right-hand column of this page. You’ll receive the add-in and installation instructions within 3 days.