“Grant access” problem when trying to open Word docs

If you're trying to open a Word doc, and it keeps saying you don't have permission (even when you own the document), asking you to grant access to the document, and then still not giving you access; then just quit out of Word completely, and then launch it up again. The document should open fine after that.

Updating MS Office dock icons from 2011 to 2016 using dockutil

Managing client machines while also giving your users freedom to customize their machines as they want can be a bit tricky. On the one hand, you want to automate things as much as possible so users don't have to be bothered with too many update prompts and other maintenance nuisances. On the other hand, you don't want to automate things in a way that will confuse your users.

Jamie (our Dir. of IT) and I had a discussion about moving people from Microsoft Office 2011 to Microsoft Office 2016 and what that would look like. We didn't want to just uninstall Office 2011 right away, especially since it's the only thing MathType will reliably work with (in February, 2016, Design Science announced compatibility with Office 2016 for Windows, with a note that compatibility with Office 2016 for Mac would be coming "soon"—still hasn't come over a year later, as of this writing). And, even though installing Office 2016 side by side with Office 2011 makes 2016 the default for Office files, we wanted to update the Dock icons, so people would launch Office 2016 applications instead of Office 2011 ones.

These were the situations we thought we'd encounter:

  1. User has MathType installed. If that's the case, we don't want to touch the Dock icons. We have only a handful of MathType users, and most of them have already installed Office 2016 (previously an optional install through Munki's Managed Software Center). Only one user asked about how to change the default application to be Office 2011's instead of Office 2016's.
  2. User has only Office 2016 icons in the Dock. Nothing to do in this scenario, because everything's cool already.
  3. User has a mix of Office 2016 and Office 2011 icons in the Dock. If both Word 2011 and Word 2016 are in the Dock, we're going to assume the user wants it that way, and we aren't going to mess with it. But if Excel 2011 and Excel 2016 are in the Dock but only Word 2011 is in the Dock, we want to switch that up to be Word 2016.
  4. User has only Office 2011 icons in the Dock. If this isn't a MathType user, let's switch these all up for Office 2016.
  5. User has no Office icons in the Dock. Leave it alone. If the user doesn't want shortcuts to Office, don't put any in there.

The tricky thing about changing up Office icons in the Dock is that dockutil goes by name or bundleid to add, and both the name and the bundleid is the same for Office 2011 and Office 2016 applications.

So I wrote up a script that checks based on the dockutil --list output to see if the Dock icon is for 2011 or not. It may not work exactly for your organization, but you can see the logic in there, and it's easily tweakable.

Can’t paste from Google Docs to Microsoft Word on Mac

Obviously not the one solution for any time this happens, but I've come across this only once (just now), and this is what worked.

The problem was the user was copying from a Google Doc and then trying to paste into a Word doc. Nothing pasted, even though the Edit menu item flashed blue as if it was trying to paste.

I thought at first that maybe it just couldn't paste outside of Google Docs itself (has been known to happen), but the text pasted just fine into a TextEdit file.

And Word itself could copy and paste text to itself (if you typed something in the Word doc and then pasted into the Word doc, it pasted just fine).

Through just trial and error, I eventually stumbled upon the solution, which was to go (in Word) to Edit, select Paste Special, and then select Unformatted Text. The paste went through just fine.

Doing an Email Merge on a Mac with Outlook, Excel, and Word

Software-as-a-Service Alternatives

If you're an organization doing a lot of targeted mailings and campaigns, you may want to consider uploading your email lists to an online service that will track campaigns and templates for you as well as give your users an easy way to unsubscribe. Here are some examples of those SaaS solutions:

Google Add-ons

There are also some third-party add-on solutions. If you don't mind the developers having access to your Google information, then you may want to explore these options:

Some other funky workarounds...

This Apple support communities discussion has some interesting other workarounds in Mac OS X for doing an email merge, including using the Mail Merge add-on for Thunderbird.

Microsoft Office (Excel, Word, Outlook) Email Merge

This blog post is really about how to do an email merge using Microsoft Office on a Mac, so here are the steps and considerations. I'm using Gmail as an example, but you can do an email merge with any kind of email account, as long as it can be put into Outlook (Exchange, POP, IMAP, etc.).

Also, please be mindful, since you don't really have an unsubscribe button in Outlook email merges, that you should still be complying with the CAN-SPAM Act guide.

macemailmerge01 So, with Gmail as an example, go to Settings.

macemailmerge02 Under Forwarding and POP/IMAP, make sure Enable IMAP is selected (you may have to scroll down a bit to see the option).

macemailmerge03 For some reason, Google doesn't consider Outlook to be secure, so in order to access Google from Outlook, you'll have to go to google.com/settings/security/lesssecureapps and select Turn on.

macemailmerge04 Launch up Outlook and select Outlook > Preferences.

macemailmerge05 Click on Accounts

macemailmerge06 Add whatever account you plan on emailing from. Since we're using a Gmail account as an example, you would click Other Email.

macemailmerge07 Enter the appropriate information, and then click Add Account.

macemailmerge08 Then click on Outlook and select Work Offline. This step isn't necessary, but I highly recommend it, because it gives you a chance to spotcheck the merged emails before they go out.

macemailmerge09 Now, launch up /Applications/Mail.app and go to Mail and select Preferences.

Unfortunately, Apple has made it so you can't select the preferences until you have set up at least one account, so you may have to set up your email account in Mail as well, even though we won't be using it.

macemailmerge10 Under Default email reader, select Microsoft Outlook.app.

If you find that Mail keeps reverting the default email client to be Mail instead of Outlook, you may have to run this command:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -all local,system,user
(Don't run it prefaced with sudo—just run it as is). Thanks to Max108 for the tip.

macemailmerge11 Make sure your Excel worksheet has at least an email column and another column (e.g., First Name). Save the Excel file some place where you can find it easily later.

macemailmerge12 Launch up Word and under Mailings, select the type to be Letters.

macemailmerge13 Then, select Use an Existing List and find the Excel file you saved earlier.

macemailmerge14 If you created the Excel sheet, you know it's not malicious. Click OK.

macemailmerge15 Click OK again, unless you're using another worksheet and have to select that.

macemailmerge16 You can insert values from different columns in the spreadsheet to be dynamic parts of your email (for example, Dear «First_Name» so the person's actual first name fills in).

macemailmerge17 When you're happy with how your "letter" (email) looks, select Merge to E-Mail.

If Merge to E-Mail is grayed out, it means Word doesn't think that Outlook is the default email client. I've seen two situations for this—one is addressed with that command in case Mail stubbornly keeps itself as the default email client, and the other is the corresponding Outlook version not being installed. In other words, you can mix and match and use Word 2011 with Outlook 2016 as long as Outlook 2011 is installed.

macemailmerge18 Select the email address header for the To, put in the email subject you want recipients to see for Subject, and then select the message format type (probably HTML Message if you have any kind of bold/italics/color in your message).

Then click Mail Merge to Outbox.

macemailmerge19 This is where the setting-Outlook-to-offline-mode approach pays off, because you'll see your Outbox populate with the merged emails that won't send immediately.

macemailmerge20 So it means you can go into several of the pending emails and just make sure they look the way you want.

macemailmerge21 When you're satisfied with the messages, select Outlook > Work Offine to put it back online again, and then your messages should send.

Office 2016 changes for Munki and AutoPkg

Sources and Further Reading

Demystify Office 2016 for Mac is a super-comprehensive breakdown of the changes in Microsoft Office 2016 for Mac. It was a bit too comprehensive for me. I kind of wanted just a bottom line, which the autopkg-discuss mailing list helped me with, and which I'll summarize below.

General Gist of Procedure

If you were using Munki and AutoPkg before with Office 2016 and simply distributing a single /Library/Preferences/com.microsoft.office.licensingV2.plist as a payload to clients, you need to instead re-download the new .iso from Microsoft's volume licensing site and distribute volume licensing (see two methods below) to clients.

Also make the following (credit: link above) the preinstall script (to get rid of the previous .plist if you were distributing that):

# Check for the existence of Microsoft's licensing file. If it exists, remove
# it prior to running Microsoft_Office_2016_VL_Serializer.pkg.
if [ -f '/Library/Preferences/com.microsoft.office.licensingV2.plist' ]; then
/bin/rm -f '/Library/Preferences/com.microsoft.office.licensingV2.plist'
exit 0

When the clients install that new package, it will create a /Library/Preferences/com.microsoft.office.licensingV2.plist that is unique to the machine.

Method 1

Note: This method didn't actually work for me, but based on everything I've read, it should work, so I'm still presenting it as a possibility.

Just get the Microsoft_Office_2016_VL_Serializer.pkg (which can import directly into Munki) from the .iso and distribute that out (with the above preinstall script).

Method 2

Note: This method did work for me, but it's a bit convoluted and involves (without repackaging the whole thing) the client machines having to download over a 1 GB of a .pkg to not install most of it.

Basically, run

installer -showChoiceChangesXML -pkg /PATH/TO/PACKAGE/Microsoft_Office_2016_Volume_Installer-15.##.pkg -target /
and then you'll get a bunch of installer choices (Excel, PowerPoint, etc.).

Using the Munki Wiki guide on ChoiceChangesXML, deselect all the actual parts of Office except for the licensing, fonts, and framework.

Then, input the .pkg into Munki and paste the modified choice changes array, and take out the receipts for all the other packages (I basically left in receipts for only com.microsoft.pkg.licensing and com.microsoft.pkg.licensing.volume).

Make that an update-for package for any of the Office 2016 programs, and include the above preinstall script.

Making Microsoft AutoUpdate check manually for Macs with Munki

Note: I'm writing with regard to Microsoft Office for 2011. It's possible the .plist file updates here is different for other versions of Microsoft Office for Mac.

If you're using Munki to manage software updates, you don't want the applications themselves to be constantly checking for updates or notifying your users when an update is available. Just as you can disable Java update prompts and disable Adobe Flash player prompts, you can also disable Microsoft Office update prompts.

To do so from the GUI (graphical user interface), you open up an MS Office application like Word, and then go to Help and Check for Updates.

You'll then see something like this, and you can change it from Automatically to Manually.

But with a bunch of Munki clients, you don't want to do that for each user. The whole point of Munki is to automate things, so what you really want to do is invoke a terminal command that you can script:

defaults write com.microsoft.autoupdate2 HowToCheck "Manual"
That one command does it for only the logged-in user if the user runs it. Any package you distribute via Munki (I'd highly recommend Packages as a way to point-and-click-create a package with no payload and only a script) will run as root, so you probably want to do something a bit more complicated to make sure you have your bases covered.

I created the following script that loops through all the existing users, changes their preferences from automatic to manual, makes sure they're still the owner of the .plist that's been changed (instead of root owning it) and then changing the default global setting from automatic to manual for any users created in the future (and, yes, I've tested it—changing it in /Library/Preferences will affect newly-created users).


# Declare a function to delete the user files

# Make sure it's not the general "Shared" user
if [[ $1 != "Shared" ]]; then

sudo defaults write /Users/$1/Library/Preferences/com.microsoft.autoupdate2 HowToCheck "Manual"

# Assign a temporary variable for the exit status of the last command

# Check that the exit status is 0 (i.e., good)
if [[ $rc == 0 ]]; then

# Make sure, even though we ran sudo, that the user is still the owner of that file
sudo chown $1 /Users/$1/Library/Preferences/com.microsoft.autoupdate2.plist



# Loop through the /Users directory
cd /Users

for d in *
fix_existing_users $d

# Fix the global one, too
sudo defaults write /Library/Preferences/com.microsoft.autoupdate2 HowToCheck "Manual"
Just make that package and mark it in the pkgsinfo .plist as an update for Microsoft Office, and then it should push out to your users when they check for updates.

Error 0x80070190 when activating Microsoft Office 2010

Had this happen once on a Windows machine. Microsoft has several solutions outlined at When attempting to activate Office 2010 receive error "An unspecified error has occurred. Your request cannot be processed at this time. Please try again later. (0x80070190)"

The one that worked for me was 3. Change the UserOperations key under HKEY_LOCAL_MACHINE\Software\Microsoft\OfficeSoftwareProtectionPlatform to have a value of 1.