Office 2016 DefaultsToLocalOpenSave setting change as of Office 2016 15.33.x
As part of the release of Office 2016 15.33.0, a number of managed preference options have been added and some have changed from what they were before. An example of one that has changed is the DefaultsToLocalOpenSave management setting, which sets the Open and Save options in Office 2016 apps to default to On My Mac instead of Online Locations.
In Microsoft Office 2016 15.32.x and earlier, the DefaultsToLocalOpenSave setting could only be managed by running a command similar to the one below on the individual user accounts:
/usr/bin/defaults write "/path/to/user/homefolder/Library/Group Containers/UBF8T346G9.Office/"com.microsoft.officeprefs DefaultsToLocalOpenSave -bool true
To set this for all accounts on a particular Mac, I had written the following script:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set the Open and Save options in Office 2016 apps to default to | |
# "On My Mac" instead of "Online Locations" in the default user template | |
for USER_TEMPLATE in "/System/Library/User Template"/* | |
do | |
/usr/bin/defaults write "${USER_TEMPLATE}/Library/Group Containers/UBF8T346G9.Office/"com.microsoft.officeprefs DefaultsToLocalOpenSave -bool true | |
done | |
# Set the Open and Save options in Office 2016 apps to default to | |
# "On My Mac" instead of "Online Locations" in the user folders | |
# located in /Users, then fixes the permissions on the affected | |
# file so that the file is owned by the user folder's owner rather | |
# than being owned by root. | |
for USER_HOME in /Users/* | |
do | |
USER_UID=`basename "${USER_HOME}"` | |
if [ ! "${USER_UID}" = "Shared" ]; then | |
if [ ! -d "${USER_HOME}/Library/Group Containers/UBF8T346G9.Office" ]; then | |
/bin/mkdir -p "${USER_HOME}/Library/Group Containers/UBF8T346G9.Office" | |
/usr/sbin/chown "${USER_UID}" "${USER_HOME}/Library" | |
/usr/sbin/chown "${USER_UID}" "${USER_HOME}/Library/Group Containers" | |
/usr/sbin/chown "${USER_UID}" "${USER_HOME}/Library/Group Containers/UBF8T346G9.Office" | |
fi | |
if [ -d "${USER_HOME}/Library/Group Containers/UBF8T346G9.Office" ]; then | |
/usr/bin/defaults write "${USER_HOME}/Library/Group Containers/UBF8T346G9.Office/"com.microsoft.officeprefs DefaultsToLocalOpenSave -bool true | |
/usr/sbin/chown "${USER_UID}" "${USER_HOME}/Library/Group Containers/UBF8T346G9.Office/"com.microsoft.officeprefs.plist | |
fi | |
fi | |
done |
As of Microsoft Office 2016 15.33.x, this setting can now be set at the global level for all users by running the following command with root privileges:
/usr/bin/defaults write /Library/Preferences/com.microsoft.office DefaultsToLocalOpenSave -bool true
I’ve posted an updated script for manage this setting to GitHub, available via the link below:
This setting can now also be managed with a profile, so I’ve created a .mobileconfig file and posted it here on Github:
https://github.com/rtrouton/profiles/tree/master/Office2016DefaultToLocalSave
Doesn’t seem to change anything for me. It still defaults to OneDrive or SharePoint.
Any way to enforce cloud save (onedrive/sharepoint)?
Many, many thanks for this! Used sudo in Terminal to solve my problem in Excel 2019.
The
/usr/bin/defaults write /Library/Preferences/com.microsoft.office DefaultsToLocalOpenSave -bool true
commend worked well – being on Office 2019. Only drawback remains is the showing of “Online Locations” and the option to open ‘Original’, ‘Repair’ or ‘Recover text’ – all but ‘Original’ I hope never having to use … pity that I have no idea to get rid of this further MS-nonsense.