Applies ToWord for Microsoft 365 Word for Microsoft 365 for Mac Word 2021 Word 2021 for Mac Word 2019 Word 2019 for Mac Word 2016

The Template field inserts the file name of the document's template, using information from the Summary tab in the Properties dialog box. To view the Properties dialog box, click the File tab, click Info, click Properties (below the document preview on the right side), and then click Advanced Properties.

Security Note: Because field codes can be visible to anyone reading your document, be sure that the information you place in field codes is not information that you want kept private.

Syntax

When you view the Template field in your document, the syntax looks like this:

{ TEMPLATE [Switches ] }

Note:  A field code tells the field what to show. Field results are what’s shown in the document after having evaluated the field code. To toggle between viewing the field code and the field code results, press Alt+F9.

Switches

\p

Includes the file location, or path, with the file name.

Example

To print information such as "Document: Harbor Development Proposal.doc, based on the RFP Project.dot document template" on each page of a document, insert the following text and fields in a header or footer:

Document: { FILENAME }, based on the { TEMPLATE } document template"

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.