Tags

, , , ,

The power of SharePoint is integration with other Office application, like Microsoft Word. Very easy, a normal user can create a document library based on Microsoft Word template. When user clicks on “New Document” button, a Microsoft Word document is created. Behind the document there is a template, called by default “template.dotx” and placed inside document library folder, in a sub-folder called “Forms”.

But probably any company with SharePoint installed as intranet will want to have some documents with special formats. And this is the point when a user might decide to have his own template instead of default one. For this is sufficient to follow the next steps:

  1. Open Microsoft Word application, create a document template (with extension dotx), customize it and save it on your computer. As an example we choose “MyTemplate.dotx” as file name.
  2. With SharePoint Designer open the website, navigate to document library’s “Forms” sub-folder and upload document template you have just created.
  3. Go to library settings and navigate to “Advanced settings” menu. In the Template URL textbox, change URL accordingly. In my case I change it to “Word Documents/Forms/MyTemplate.dotx” as “Word Documents” is the name of document library and also the URL of the root folder and “MyTemplate.dotx” is the name of template file. This straight forward and there is not much to explain here.

Any user who completes these steps has a “Bingo!”. Now, a document with predefined layouts is created by clicking on “New Document” button.

Integrate Word document template with fields

When you create custom fields in the document library, these fields become document properties. For example we might want to create “Last Name” and “First Name” fields and we intend to use them in the documents. Just go to “Advanced settings” and click “Edit Template” link.
EditTemplate
In this moment, Word client application will open the template we have uploaded in order to edit it.

Our work is an easy one from this point. In Word 2013, document properties can be inserted extremely easy from Quick Parts -> Document Property menu.
DocumentProperties
From now, changes done to Last Name and First Name fields are reflected into the document content.

Advertisements