Friday 17 February 2012

Using quick-parts to automatically update fields in a Microsoft Office document, from the metadata in a SharePoint document library

Sometimes you find yourself in the scenario where you need to capture metadata as part of a document (for instance a Quote or a legal documnet, which then populates throughout the document where ever the field is placed. Sure, this doesn’t happen a lot, but when it happens, making use of quick parts is an easy way to do it.

Step 1: Create a SharePoint document library as you usually would

Step 2: If the document template is reusable, create a Site Content type as you usually would and add the site columns to it you would like to associate with it

image

Otherwise you could simply create list level custom columns and upload the document we’ll be creating in a minute under advanced settings

image

image

Step 3 (I will assume you are using a custom content type):

Create a new document of the content type you just created (for this demo I based it on a Medical Report required by one of our local banks for Insurance purposes)

image

Step 4: After creating a new document, save it first, or it won’t allow you to insert the metadata values from the document library. Call it anything, this is a temporary document.

Step 5: With the document open, click the Insert tab –> Quick-Parts –> Document Property –>
and select the property you would like to insert

image

Step 6: Repeat step 5 for all the properties you want to see on your document. You will immediately see the property fields fill them selves as you fill in the metadata at the top

image

Step 7: Once you’ve finished updating the document template with all the required fields, save it offline – i.e. to your desktop.

Step 8: Upload the document you saved offline as the template to be used for your content type

image

And that’s it! You will notice that if you change the metadata in the column on SharePoint, the values will be changed as soon as you open the document again.

No comments:

Post a Comment