Using quickparts in document templates

One of the cool things of working with MS Word 2007 and SharePoint 2007 is the ability of working with Quickparts. You can use Quickparts to give your users the ability to fill in document propertieson the document itself. If you look at the picture below you see that we can fill in the document properties from the document information panel and that they are visualized on the page itself. You can go the other way around as well, by filling them in the Quickpart.

You can do the same with metadata. Metadata is some extra information of your document. You can add metadata to a document library by adding columns to that library. Once you've created the columns you can use these metadata as Quickparts on your document. But the question rises, what if I'm creating a document template? First of all, the document template is the document that you get when you click the new button.

The reason why I got this question is because mostly you create such a template on the client side where you have no a connection to your document library. The solution is fairly simple, just use the document library to create your template. Meaning, don't start on the client side but open the word document by clicking on the new button of your document library.

Let's create a document library, which is based on the word template and add some metadata. I've create a 'My Documents' library and I've added one column which is the 'Description' column. I've pick multiple lines of text as the type for the column.


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To have the connection between your word document and the metadata from the library click the New button, this will open up a new document. Once your document is open you can add a Quickpart which you can find on the Insert tab. You will see that the Description field is now available.

All set and done, if you want to have a nice header and footer, go aheadJ. Save the document on your desktop and not in the document library because we are going to use this one as a template.

Once the document is saved, you need to copy this into the forms folder of the document library. The easiest way to go there is via the 'Open with Windows Explorer' in the Actions menu of your document library.

This forms folder contains all the files to display and work with the document library. You will also find a template file that is used by the document library to open a new document, in our case that is the template.dotx file. If you want to use your own template you can just drag your document into the forms folder.

Once you've dragged your file into that folder you need to specify that you want to use this template. You can do this in the Advanced Settings of your document library, which you can find in the document library settings.

Once on the Advanced Settings page, go to the Document Template section and change the default template to yours.

That's it, just go back to your document library and press the New button.