How to embed SharePoint columns into document templates

Besides the missing document information panel, another common question about document properties is how to embed properties which come from a SharePoint column to a document template. This can easily be solved by using content types and site columns. Follow these steps:

1) Create a custom content type. In my case, its name is “Training Document”, inherited from the out-of-the-box document content type:



2) Add your custom site column to this content type, in my case “Training ID”:



3) Assign this content type to your document library:



4) Create a document in this library, based on this content type:



5) When editing the document, add the properties of your choice. For example, Training ID:



6) Save the document to your SharePoint library in the format of your choice, docx or dotx. In my case, its file name is “Training-Document-Template.docx”.

7) Copy the URL of this document, in this format: http://[the-url-of-your-document-library]/Training-Document-Template.docx

8) Go back to site settings, and open your new content type settings again. Open “Advanced Settings” and copy the URL to the document template URL field:



9) Save your content type.

10) Go back to the document library and check if everything is working correctly: create a new document based on this content type (Training Document) again, and violá! – It uses the new template, with the embedded SharePoint document property.

Bonus: If you don’t want to store the template in the same library as your business documents are, create a separate library for the template(s). The steps are the same as above. The only additional thing is that you have to add the content type to both document libraries.









Comments are closed.