


In Word 2013 and Word 2010 you can see them on the right-side of the Info screen. Click on either text and you’ll see that.Ĭhange the document property and the document changes.Įach Office document (Word, Excel and PowerPoint) has a series of hidden document properties that can be shown within a document. In fact some of the supplied Header formats in Word use document properties (like Title) already.īoth places where you see ‘Flanders and Swann’ it’s actually a document property. Document properties let you replace text in places Word itself won’t go.įor example, the document Title property can show up in the Header or even as text in the document. It’s a way to quickly and easily automate your document and ensure it’s consistent and accurate. However it can be used in much wider and creative ways.Īny time you have a piece of text repeated within a document, is a potential use for document properties. It can be quite useful and not always in the ways that Microsoft intends.Īt first, document properties looks like a fixed and rigid feature with limited use. Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.Document Properties is one of those long-standing parts of Office that is worth another look. MsgBox "This document contains " & intWords & " words." IntWords = ActiveDocument.BuiltInDocumentProperties(wdPropertyWords) This example displays the number of words in the active document. Sub ListProperties()įor Each proDoc In ActiveDocument.BuiltInDocumentProperties

This example inserts a list of built-in properties at the end of the active document. Use the CustomDocumentProperties property to return the collection of custom document properties. If Microsoft Word doesn't define a value for one of the built-in document properties, reading the Value property for that document property generates an error.įor information about returning a single member of a collection, see Returning an object from a collection. To return a single DocumentProperty object that represents a specific built-in document property, use the BuiltinDocumentProperties property. A variable that represents a Document object. Returns a DocumentProperties collection that represents all the built-in document properties for the specified document.
