{"id":91,"date":"2020-02-17T16:12:55","date_gmt":"2020-02-17T15:12:55","guid":{"rendered":"https:\/\/help.metashare.com\/metashare-help-admin-manual-how-to-create-smart-document-templates\/"},"modified":"2026-05-08T23:14:06","modified_gmt":"2026-05-08T21:14:06","slug":"how-to-create-smart-document-templates","status":"publish","type":"page","link":"https:\/\/help.metashare.com\/en\/metashare\/get-started\/document-templates\/how-to-create-smart-document-templates\/","title":{"rendered":"How to create smart document templates"},"content":{"rendered":"\n<p>This page explains how to create &#8220;smart&#8221; documents templates in Microsoft Word, using quick parts, to display document metadata from SharePoint inside the actual document, e.g. the page header\/footer, e.g:<br><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3576\" src=\"https:\/\/help.metashare.com\/wp-content\/uploads\/image-1052.png\" alt=\"Document metadata displayed on a page header\" width=\"808\" height=\"133\" srcset=\"https:\/\/help.metashare.com\/wp-content\/uploads\/image-1052.png 808w, https:\/\/help.metashare.com\/wp-content\/uploads\/image-1052-300x49.png 300w, https:\/\/help.metashare.com\/wp-content\/uploads\/image-1052-768x126.png 768w\" sizes=\"auto, (max-width: 808px) 100vw, 808px\" \/><br>To add an embedded metadata, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add the site columns that should be added as metadata, to the document template library&nbsp;(<a href=\"https:\/\/help.metashare.com\/en\/adminmanual\/how-to-create-and-define-the-document-templates-library\/\">see instructions here<\/a>).<\/li>\n\n\n\n<li>Open a Word document from the document templates library.<\/li>\n\n\n\n<li>Place the marker in the document where you want to add the quick part.<\/li>\n\n\n\n<li>Select the \u201cInsert\u201d tab in Word and, in the &#8220;Text&#8221; section, then \u201cQuick Parts\u201d and depending on which metadata you want to add, you either select \u201cDocument Property\u201d (for all custom columns and certain word properties) or &#8220;Field&#8221; (for certain standard SharePoint columns):<br><img loading=\"lazy\" decoding=\"async\" width=\"309\" height=\"174\" class=\"alignnone size-full wp-image-3574\" src=\"https:\/\/help.metashare.com\/wp-content\/uploads\/image-1051.png\" alt=\"Inserting Quick Parts\" srcset=\"https:\/\/help.metashare.com\/wp-content\/uploads\/image-1051.png 309w, https:\/\/help.metashare.com\/wp-content\/uploads\/image-1051-300x169.png 300w\" sizes=\"auto, (max-width: 309px) 100vw, 309px\" \/><br>In the section &#8220;Standard SharePoint columns as embedded Metadata&#8221; bellow, you will see which quick parts to choose, for standard SharePoint columns.<\/li>\n\n\n\n<li>Select the appropriate quick part.<\/li>\n\n\n\n<li>If needed, format the inserted quick part (font, font size, font color, etc.).<\/li>\n\n\n\n<li>Save and close the document.<\/li>\n\n\n\n<li>New documents that are created from the template will now contain the Quick Part (metadata).<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Standard document properties as embedded metadata<\/h2>\n\n\n\n<p>These standard document properties can be added as embedded metadata:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Name\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>&#8220;Name&#8221; is the document&#8217;s name, including its file-extension.<\/li>\n\n\n\n<li>Can be added as an embedded metadata in documents, by inserting the &#8220;FileName&#8221; Field Quick Part.<\/li>\n\n\n\n<li>Unfortunately this field does not automatically update when you open a document. <a href=\"https:\/\/help.metashare.com\/en\/get-started\/how-to-create-smart-document-templates\/#how-to-update-fields-in-word\">Here you find instructions<\/a> on how to make this field updated, manually or automatically.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Created\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>Can be added as an embedded metadata in documents, by inserting the &#8220;CreateDate&#8221; Field Quick Part.<\/li>\n\n\n\n<li>Unfortunately this field does not automatically update when you open a document. <a href=\"https:\/\/help.metashare.com\/en\/get-started\/how-to-create-smart-document-templates\/#how-to-update-fields-in-word\">Here you find instructions<\/a> on how to make this field updated, manually or automatically.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Author\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>Can be added as an embedded metadata in documents, by inserting the &#8220;Author&#8221; Field Quick Part.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Modified\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>Can be added as an embedded metadata in documents, by inserting the &#8220;SaveDate&#8221; Field Quick Part.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Modified by\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>Can be added as an embedded metadata in documents, by inserting the &#8220;LastSavedBy&#8221; Field Quick Part.<\/li>\n\n\n\n<li>Unfortunately this field does not automatically update when you open a document. <a href=\"https:\/\/help.metashare.com\/en\/get-started\/how-to-create-smart-document-templates\/#how-to-update-fields-in-word\">Here you find instructions<\/a> on how to make this field updated, manually or automatically.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Title\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>&#8220;Title&#8221; is a regular document column that users can update, if the column is available in the documents\u2019 content type, as mandatory or optional.<\/li>\n\n\n\n<li>It can be added as an embedded metadata in documents, by inserting the &#8220;Title&#8221; Document Property Quick Part.<\/li>\n\n\n\n<li>This column is synchronized with the documents\u2019 &#8220;Title&#8221; property.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Document ID\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>Can be added as an embedded metadata in documents, by inserting the &#8220;Document ID Value&#8221; Document Property Quick Part (only shown if you have <a href=\"https:\/\/help.metashare.com\/en\/faq\/do-documents-in-sharepoint-have-a-unique-id\/#unique-document-id\">activated the &#8220;Document ID Services&#8221; feature<\/a>).<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Document version number as an embedded metadata<\/h2>\n\n\n\n<p>Unfortunately there&#8217;s no easy and foolproof way to show a document&#8217;s version number as an embedded metadata inside a document. It is however possible to create a custom flow that does this but it requires some development effort which could be offered by MetaShare&#8217;s development team.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Other Document Property Quick Parts that can be used as embedded metadata<\/h2>\n\n\n\n<p>Apart from the file properties mentioned above, other file properties can also be added as Document Property Quick Parts. Some of these&nbsp;can be set, from Microsoft Word, by clicking on the document&#8217;s &#8220;File&#8221; tab, selecting &#8220;Info&#8221;. The properties are located under the &#8220;Properties&#8221; section:<br><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3580\" src=\"https:\/\/help.metashare.com\/wp-content\/uploads\/image-1041.png\" alt=\"Other file properties that can be added as Quick Parts\" width=\"876\" height=\"573\" srcset=\"https:\/\/help.metashare.com\/wp-content\/uploads\/image-1041.png 876w, https:\/\/help.metashare.com\/wp-content\/uploads\/image-1041-300x196.png 300w, https:\/\/help.metashare.com\/wp-content\/uploads\/image-1041-768x502.png 768w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/p>\n\n\n\n<p>These properties plus a few more, can also be set and updated from within Word, by first adding them as Document Property Quick Parts and then updating their values:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Quick Part&#8217;s name<\/td><td>Available as File property?<\/td><\/tr><tr><td>Abstract<\/td><td>&nbsp;<\/td><\/tr><tr><td>Author<\/td><td>Yes<\/td><\/tr><tr><td>Category<\/td><td>Yes, as &#8220;Categories&#8221;<\/td><\/tr><tr><td>Comments<\/td><td>Yes<\/td><\/tr><tr><td>Company<\/td><td>Yes<\/td><\/tr><tr><td>Company address<\/td><td>&nbsp;<\/td><\/tr><tr><td>Company E-mail<\/td><td>&nbsp;<\/td><\/tr><tr><td>Company Fax<\/td><td>&nbsp;<\/td><\/tr><tr><td>Company Phone<\/td><td>&nbsp;<\/td><\/tr><tr><td>Keywords<\/td><td>Yes, as &#8220;Tags&#8221;<\/td><\/tr><tr><td>Manager<\/td><td>Yes<\/td><\/tr><tr><td>Publish Date<\/td><td>&nbsp;<\/td><\/tr><tr><td>Status<\/td><td>&nbsp;<\/td><\/tr><tr><td>Status<\/td><td>Yes<\/td><\/tr><tr><td>Subject<\/td><td>Yes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How to update fields in Word<\/h2>\n\n\n\n<p>Unfortunately some embedded \u201cDocument Property\u201d fields, e.g. &#8220;Name&#8221;, are not automatically updated when you open a Word document. The field will however automatically be updated when you switch to print preview, if &#8220;Update fields before printing&#8221; in Word Options is set to yes:<br><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5112\" src=\"https:\/\/help.metashare.com\/wp-content\/uploads\/Update-fileds-before-printing-1.jpg\" alt=\"Update fields before printing\" width=\"600\" height=\"489\" srcset=\"https:\/\/help.metashare.com\/wp-content\/uploads\/Update-fileds-before-printing-1.jpg 837w, https:\/\/help.metashare.com\/wp-content\/uploads\/Update-fileds-before-printing-1-300x244.jpg 300w, https:\/\/help.metashare.com\/wp-content\/uploads\/Update-fileds-before-printing-1-768x626.jpg 768w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n\n\n\n<p>If you want to manually update a field in the document, just select the field and then press F9 on your keyboard.<\/p>\n\n\n\n<p>You can otherwise create a Word Macro that does this automatically for you when you open any document, the disadvantage of this is that all documents will be modified, when you open a document and you will be asked if you want to save your changes when you close the document even if it is only opened in read-only mode. To do this you have to:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click on Word&#8217;s &#8220;Developer tab&#8221;, and then click &#8220;Macros&#8221; in the &#8220;Code&#8221; group.<\/li>\n\n\n\n<li>In the Macros dialog box&#8217;s &#8220;Macro name&#8221; field, type: AutoOpen.<\/li>\n\n\n\n<li>To make the Macro run on all documents that you open in Word, select to store the macro in &#8220;All active templates and documents&#8221; in the &#8220;Macros in&#8221; field.<\/li>\n\n\n\n<li>Click the &#8220;Create&#8221; button.<\/li>\n\n\n\n<li>In the code sheet of the Microsoft Visual Basic editor, you should now see the beginnings of your AutoOpen macro. It will look like this:<br><code>Sub AutoOpen() ' ' AutoOpen Macro End Sub<\/code><\/li>\n\n\n\n<li>Copy and paste, the following macro code into your AutoOpen macro, before the last line:<br><code>Dim aStory As Range<\/code><br><code>Dim aField As Field<\/code><br><code>For Each aStory In ActiveDocument.StoryRanges<\/code><br>     <code>For Each aField In aStory.Fields<\/code><br>          <code>aField.Update<\/code><br>     <code>Next aField<\/code><br><code>Next aStory<\/code><\/li>\n\n\n\n<li>Your AutoOpen macro should now look something similar to the this:<br><img loading=\"lazy\" decoding=\"async\" width=\"399\" height=\"231\" class=\"wp-image-8918\" style=\"width: px\" src=\"https:\/\/help.metashare.com\/wp-content\/uploads\/Word-macro-that-update-fields.jpg\" alt=\"Word macro that update fields\" srcset=\"https:\/\/help.metashare.com\/wp-content\/uploads\/Word-macro-that-update-fields.jpg 399w, https:\/\/help.metashare.com\/wp-content\/uploads\/Word-macro-that-update-fields-300x174.jpg 300w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/li>\n\n\n\n<li>On the File menu and click on &#8220;Save&#8221;.<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-group has-text-bright-color has-accent-1-background-color has-text-color has-background has-link-color wp-elements-5715d999d759a44a854d1a0508fae595\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading has-text-bright-color has-text-color has-link-color wp-elements-d1bac14c5327bf7abb712f1154155733\">Discover MetaShare<\/h2>\n\n\n\n<p>Metadata-centric document management system in Microsoft 365\/SharePoint<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Eliminates annoying gaps in standard SharePoint<\/li>\n\n\n\n<li>Ensures data in SharePoint is well structured<\/li>\n\n\n\n<li>Structures with metadata instead of storing in traditional folders<\/li>\n\n\n\n<li>Centralized and simplified administration<\/li>\n\n\n\n<li>Orchestration\/provisioning of settings<\/li>\n\n\n\n<li>Refined Enterprise search<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/metashare.com\/en\/demo\/\">See demo<\/a><\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Getting started with MetaShare: how to create smart document templates. Follow these step-by-step instructions to set up MetaShare in your Microsoft 365\u2026<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":10711,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":{"0":"post-91","1":"page","2":"type-page","3":"status-publish","5":"no-featured-image-padding"},"_links":{"self":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":23,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/91\/revisions"}],"predecessor-version":[{"id":12541,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/91\/revisions\/12541"}],"up":[{"embeddable":true,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/10711"}],"wp:attachment":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/media?parent=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}