Posted on 02-15-2017 08:47 AM
Does anyone know of a way we can get our custom templates to pull from the location they are stored and copy down to a directory on login using a policy to copy the files from that drive. Once they are copied down I want them to show up in Office once you open it and you see all the templates. Which directory would they need to be copied too? Any help is appreciated
Posted on 02-15-2017 09:58 AM
I drop my templates in /tmp/company/ then have a script to copy to each user's home. Office 2016, obviously. Script was written by a colleague.
cd /Users
for i in *; do
if [ "$i" != "Deleted Users" ]; then
if [ "$i" != "Shared" ]; then
mkdir -p /Users/$i/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Templates.localized/
cp /tmp/company/* /Users/$i/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Templates.localized/
chown -R $i /Users/$i/Library/Group Containers/UBF8T346G9.Office/User Content.localized
mkdir -p /System/Library/User Template/English.lproj/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Templates.localized/
cp /tmp/company/* /System/Library/User Template/English.lproj/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Templates.localized/
fi
fi
done
Posted on 02-15-2017 10:16 AM
How about just applying them to the general templates folder in:
/Library/Application Support/Microsoft/Office365/User Content.localized/Templates.localized
Posted on 02-16-2017 10:55 AM
I get this error when copying the script and changing the path.
Executing Policy MS Office Templates
Running script Office Templates.sh...
Script exit code: 2
Script result: /Library/Application Support/JAMF/tmp/Office Templates.sh: line 1: cd: /Users
: No such file or directory
/Library/Application Support/JAMF/tmp/Office Templates.sh: line 2: syntax error near unexpected token `do
'
/Library/Application Support/JAMF/tmp/Office Templates.sh: line 2: `for i in *; do
'
Error running script: return code was 2.
Running Recon...
Error running recon: Connection failure: "The operation couldn’t be completed. ( error 504.)"
I am thinking it has something to do with the location