Home > Mac administration, Mac OS X, Office 2016 > Deploying Word, Excel and PowerPoint templates for Microsoft Office 2016

Deploying Word, Excel and PowerPoint templates for Microsoft Office 2016

In many shops, Mac admins have a requirement to deploy templates for Microsoft Word, Excel or PowerPoint. With Microsoft Office 2011, this is a relatively straightforward process as there is an existing directory for Word, PowerPoint and Excel templates at the location shown below:

/Applications/Microsoft Office 2011/Office/Media/Templates

Template files deployed to this location are available to all users on the Mac.

Screen Shot 2016 03 05 at 9 29 10 PM

 

In contrast, the necessary support directories for templates are not created by Office 2016 by default, so they are not likely to exist unless templates had previously been installed. The reason for this is that Office 2016 apps are sandboxed and don’t have the ability to write to locations outside the application sandbox unless granted permission. Fortunately, the Office team at Microsoft has documented in the PDF document linked below where templates should be installed:

Installing User Content in Office 2016 for Mac:
http://macadmins.software/docs/UserContentIn2016.pdf

When I read the documentation, it showed that the correct place to store template files is at the location shown below:

/Library/Application Support/Microsoft/Office365/User Content.localized/Templates.localized

Template files deployed to that location are available to all users on the Mac.

Screen Shot 2016 03 05 at 10 12 32 PM

 

As mentioned previously, the necessary support directories for templates are not created automatically when Office 2016 is installed. To address this, I’ve written a script that will create the needed directory structure. For more information, see below the jump.

The script shown below is designed to do the following:

  1. Create the directories needed for Office 2016 Word, Excel and PowerPoint templates
  2. Assign those directories the following permissions:
  • root: Read, Write, Execute
  • admin: Read, Write, Execute
  • Everyone: Read, Execute


#!/bin/bash
# This script checks for and (if needed) creates the directories for Office 2016 templates for Word, PowerPoint and Excel
if [[ ! -e "/Library/Application Support/Microsoft/Office365/User Content.localized/Templates.localized" ]]; then
/bin/echo "Necessary support directories for Office 2016's Word, PowerPoint and Excel templates not found."
/bin/echo "Creating necessary support directories for Office 2016's Word, PowerPoint and Excel templates."
/bin/mkdir -p "/Library/Application Support/Microsoft/Office365/User Content.localized/Templates.localized"
/usr/sbin/chown root:admin "/Library/Application Support/Microsoft" && /bin/chmod 775 "/Library/Application Support/Microsoft"
/usr/sbin/chown root:admin "/Library/Application Support/Microsoft/Office365" && /bin/chmod 775 "/Library/Application Support/Microsoft/Office365"
/usr/sbin/chown root:admin "/Library/Application Support/Microsoft/Office365/User Content.localized" && /bin/chmod 775 "/Library/Application Support/Microsoft/Office365/User Content.localized"
/usr/sbin/chown root:admin "/Library/Application Support/Microsoft/Office365/User Content.localized/Templates.localized" && /bin/chmod 775 "/Library/Application Support/Microsoft/Office365/User Content.localized/Templates.localized"
/bin/echo "The necessary support directories for Office 2016's Word, PowerPoint and Excel templates have been created."
fi

view raw

gistfile1.txt

hosted with ❤ by GitHub

The script is also available from my Github repo:
https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/create_office_2016_template_directory

  1. P. Villela
    May 22, 2016 at 7:59 am

    Thank you, great help. It is unfortunate that Microsoft so often breaks things that worked in previous versions.

  2. January 31, 2017 at 11:04 am

    So so so many thanks for this! I searched all over the GooglePlace for months, and finally found your article and linked MS PDF.

  1. No trackbacks yet.

Leave a reply to Roeland De Windt Cancel reply