Office Templates in the Cloud

Last Updated on

2 min read

Modernize your way of deploying Office Templates, through a cloud only approach.

Preface

In this modern day of Enterprise Mobility, using Intune and Autopilot. I often get asked, well what about Office templates files?

In the past you might have put them on a file share, or copied them to your users workstation, using a combination of scripts and Group Policy.

This is no longer optimal in a pure cloud strategy. Instead many organizations falsely assume that SharePoint Online, MUST have some built-in functionality to handle this. This unfortunately is not the case, and trying to put a URL to a SharePoint Library, into the Personal Templates setting, in programs like Word, will not work.

Personal Templates can ONLY be referenced through a UNC path or a local device path.

The modern way

To help my customers and others in the community, I have put together a script that much like my other OneDrive automation solution, uses the OneDrive client to securely and accurately transfer the templates to our Users profile.

Image of a OneDrive folder.
OneDrive brings reliable Async off-line files to the modern desktop deployment

Combining this with some registry modifications, we can tell Office, that there is a local copy of the Templates available.

The Template files will be read-only, as long as the user only has “viewer” permission on the Sharepoint Library.

Well how about if my user is not online, and haven’t used the templates in a while?

In this case, I have employed a neat little trick, to tell OneDrive to always keep the Template folder and it’s contents available off-line. Using the good old ATTRIB command, to “pin” the files to the system, always keeping them hydrated.

The Script

This is the meat you want. And I have been diligent with in-line comments, so please read thoroughly!

You can grab a copy of the script on Technet, or in my GitHub repo, which is most likely to receive updates.

Final Words

As always, I encourage you to contribute to this script via GitHub.

Just because it’s awesome to help out! And together we can make the best solutions possible.

Comments / questions / spoons / forks are always welcome.

Please follow me on Twitter@michael_mardahl to learn more about me and the knowledge I share.