Document Properties is one of those long-standing parts of Office that is worth another look. It can be quite useful and not always in the ways that Microsoft intends.
At first, document properties looks like a fixed and rigid feature with limited use. However it can be used in much wider and creative ways.
Any time you have a piece of text repeated within a document, is a potential use for document properties. It’s a way to quickly and easily automate your document and ensure it’s consistent and accurate. Document properties let you replace text in places Word itself won’t go.
For example, the document Title property can show up in the Header or even as text in the document. In fact some of the supplied Header formats in Word use document properties (like Title) already.
Both places where you see ‘Flanders and Swann’ it’s actually a document property. Click on either text and you’ll see that.
Change the document property and the document changes.
In each document
Each Office document (Word, Excel and PowerPoint) has a series of hidden document properties that can be shown within a document. In Word 2013 and Word 2010 you can see them on the right-side of the Info screen.
In Word 2007 go to Start | Prepare | Properties. Word 2003 and before to File | Properties.
Some properties are set by the application itself like file size, pages, word count, creation and last modified date.
Many others can be set by you and displayed in the document. If you change that property, the document is updated automatically.
The smarties among you might wonder at this point … why bother with document properties? There are at least two other ways to do the same thing; find & replace or bookmarks.
That’s true, however sometimes those options aren’t suitable. Replace can change text that you don’t want changed (for example when the text to find is there in other contexts) and doesn’t always work (e.g. in multiple text boxes). Bookmarks can be confusing to find and change.
Document Properties are flexible and controlled outside the main document content which can be an advantage.
You choose the solution that suits your needs and it’s good to know all the options available. We’ll explain how document properties can be used beyond the narrow purposes that are usually explained.
Setting a property
The common document properties are set on the File | Info pane as you can see above. There are more available if you click on the See more properties at bottom right of the Info pane.
Now there’s more editable properties available:
- Hyperlink Base
And there’s even more than that, but we’ll get to those later.
Let’s look at the Title property.
Changing the property is simple. Just click in the area ‘Add a title’ and type in the text you want. The data entry area doesn’t look editable but it changes into a text entry field when you click on it.
When you go back to the document, any place with the Title document property inserted will show that text.
Some properties are also visible from the Document Panel that appears above the document, worksheet or presentation. Go to Info | Properties | Show Document Panel (Word 2013/2010), File | Prepare | Properties (Word 2007).
Choosing ‘Advanced Properties’ then the Summary tab will show a list of the main document properties. This dialog box hasn’t changed much for many versions of Word going past more than a decade.
Within the document
You don’t even have to go to the Info pane if the property is already inserted into the document.
Click on the document property text so the content control box appears. The text in that box is editable so type away.
When you click away from the control, other instances of that property should be automatically updated.
For advanced users there are other ways to change document properties:
- Via VBA code
BuiltInDocumentProperties( <Property Name> ).Value or ActiveDocument.CustomDocumentProperties(<Property Name> ).Value
- Changing the XML within the document itself. It’s in docProps/core.xml in the <dc:title> tag.
Both of these options are great for programmers and network administrators. They are easier to implement than large scale replace commands within the main document.
Inserting a document property
In Word 2007, Word 2010 and Word 2013, the main document properties are at Insert | Text | Explore Quick Parts | Document Property.
As we’ve seen already, an inserted property appears as a content control when you click on it.
In Word 2003 and before go to Insert | Field | DocProperty and choose the property you want to insert a field code.
Hovering over a control changes the background to gray.
Beyond the main document properties are ‘Advanced Properties’ available from File | Info | Properties | Advanced Properties
Under the Custom tab there’s a long list of other document properties. These ‘advanced’ properties are just more inbuilt labels that aren’t on the main panes or dialog boxes.
However these ‘advanced properties’ can’t be easily added to documents nor changed within the document like the main properties can. See Custom Properties below.
The same dialog lets you add your own document properties. Any pair of text label and a property (Text,Date,Number or Yes/No) is possible.
To add a custom property, type the name/label into the Name field, choose a Type, enter a value and click Add.
Inserting Custom Properties is a little more fussy than the inbuilt properties. The standard ‘Document Properties’ insertion menu doesn’t change to allow for advanced or custom properties.
Go to Insert | Text | Quick Parts | Field | Document Information | DocProperty. Choose from the list of Properties shown which includes any custom properties.
In the document the property appears in the text where you’ve inserted it.
Press Alt + F9 to reveal the field code DOCPROPERTY that displays the custom properties.
Unlike the main document properties, you can’t change Advanced or Custom properties within the document itself. That makes Advanced and Custom properties less useful for many purposes and leads us to the simple trick that you can use.
Ignore the property name
The main document properties have names (aka labels) linked to a place for your text. Those labels are obvious things like Title, Subject etc but there’s no rule that the Subject property has to contain subject text … it can contain any text you want.
As long as you know what the property is used for … you can ignore the label.
For example, you might have a standard document for new clients. One way to insert the clients name throughout that document is to use the document property called ‘Client’. But that’s an ‘advanced’ property that’s harder to change and use.
Instead use the ‘Company’ property (or Status, Title, Subject etc.) which is more easily changed. As long as everyone using the document knows what to do, it doesn’t matter what Microsoft called the property.
Beyond Word …
Document Properties work well in Word. You can set and use properties quite easily.
In Excel and PowerPoint it’s a very different story which makes a mockery of Microsoft’s talk about consistency across the Office applications.
Both Excel and PowerPoint have document properties that you can change and even customize. But inserting those properties into documents is NOT easy at all. There’s no simple way to drop a worksheet property into a cell – amazing but true.
You’ll search in vain for an function like DocProperty() that would let you insert a document property into a cell.
Such an obvious and useful thing is completely missing. You can set Document Properties and custom properties but using them in a worksheet requires a custom VBA function.
It’s even worse in PowerPoint. There are document properties available to set but no direct way to put them into slides. Since Powerpoint lacks almost all of the document automation that Word has, the only way to get document properties into a slide is VBA to search a presentation and replace text with a document property.
Document Properties have been around for many versions of Office and appear to have been forgotten by the Microsoft Office development teams.
The Word group needs to remove the arbitrary difference between main, advanced and custom properties. All properties should be inserted as content controls and editable from within the document, just as main properties are now.
The Excel and PowerPoint development gurus need to get their act together. It should be embarrassing to both groups that document properties can be set but not easily used within their programs. The lack of an Excel function to retrieve document properties is truly astonishing.
Office Watch has the latest news and tips about Microsoft Office. Independent since 1996. Delivered once a week.