Consistent document templates with SharePoint

Consistent document templates with SharePoint

If you ask most people how they manage document templates such as company letterheads, proposals, quotes or any other business document the typical answer is usually along the lines of ‘find an old one, copy and paste into a new one’. Over time, this can lead to an unwanted evolutionary effect on the document template, which results in the template looking very different from its original form.

Of course, there’s a perfectly valid reason for people to simply cut and paste because for most it’s too difficult to do anything else. However, with SharePoint Online (included in Office 365) it’s actually quite easy. Before I show you how, I’ll fill you in on how I stumbled across it. If you’d rather skip the story click here.

One of the things I love most about working with SharePoint is that I’m constantly learning about new features. The inspiration for this post is my recent discovery of Content Types. Although Content Types are not new to me, the Content Type Publishing Hub in SharePoint Online is.

When the newly hired Sales Manager at Axiom IT requested a copy of our quote template I decided this would be a great opportunity for him to experience the benefits of SharePoint firsthand.

Given that we’d been collaborating with the help of an Office 365 Group / Planner, the technician in me figured I could simply add another Document Library to the site, create a new Content Type eg Quote and assign it to the library. After all, Planner is simply creating a SharePoint site in the backend. In theory it sounded fantastic. In practice, it failed.

For reasons I’ll probably never know, attaching a document template a content type created in the Site Content Types list results in a “Sorry, you don’t have access to this page” message. Assigning myself to the site owners group had no effect, and I quickly gave up.

A few quick google bing searches uncovered something I’d never heard of, the SharePoint Online Content Type Hub.  Essentially the Content Type Hub is a place to store Content Types which can be published to any Site Collection in an Office 365 tenant. In contrast, the Content Types published in a Site Content Types library are only available within that site and its subsites.

I’d often wondered if SharePoint provided a way to share Content Types across the entire SharePoint environment and this is it. In case you missed it earlier, this is why I love SharePoint – always something new to learn.

How to

So, how do we get started with the Content Type Hub? Easy. In your browser, navigate to https://yourtenantname.sharepoint.com/sites/contentTypeHub/

The first thing we want to do is create a new content type. Click on the cog in the top-right hand corner of the screen then go to go to Site Settings > Site Content Types > Create.

In my case, I’ll be creating a Quote content type which is a Word document so I’ll set the Parent Content Type to Document.

Click OK to save changes which takes us back to the site content type page. From here, click Advanced Settings. Upload your document template (.dotx file) and click OK to save.

From here, click Advanced Settings. Upload your document template (.dotx file) and click OK to save.

From the site content type page click Manage publishing for this content type which takes us to the content type publishing options. Select Publish and click OK.

This will update the Published Content Types next time the Content Type Subscriber timer job runs. This took less than an hour.

Next, go to the SharePoint site you wish to utilise the newly created Content Type in and open the Content type publishing settings (Cog in the top right hand corner, Site Settings -> Site Collection Administrator -> Content type publishing). If the timer job has run you should see your content type appear under Subscribed Content Type.

Now that we have a content type with a document template in our site collection, the next step is to assign the template to a document library. For this exercise I created a new document library called Quotes.

First, navigate to the document library and click on the cog in the top right-hand corner -> Library Settings -> Advanced Settings and ensure Allow management of contents types is set to Yes. Head back to the settings page and scroll to the content types section. Click Add from existing site content types and locate the newly created content type. Add it to the list and hit ok.

Head back to the settings page and scroll to the content types section. Click Add from existing site content types and locate the newly created content type. Add it to the list and hit ok. You should now see the content type appear in the list.

Navigate back to the document library and click the New button. The content type should appear in the list.

Click on the content type to create a new document using your template and voila – it should appear as per the template! No more cut and paste, hello consistency.