Resolving Office 2011 export issues with AppleScript

A user I support recently upgraded their Mavericks MacBook Air to a new retina MacBook Pro. After using Migration Assistant, they found that the ability to send Microsoft Excel spreadsheets via email from within the app results in an error whereby Excel isn’t able to save a temporary version in the TemporaryItems folder, so was unable to add an attachment to a new message.

Rather than instruct the user on how to navigate to a folder, explain what the folder they need to navigate to is and then delete it, it was far easier (and safer) to simply write a script to do this instead.

Fortunately, the full path of the TemporaryItems folder is actually available within AppleScript simply by using “path to temporary items”. Here’s the full script that I then saved as a run-only app that the user could simply run1.

As a precaution, it displays a confirmation dialog first. To use it, just copy and paste the above into a new AppleScript file.

  1. Additionally, the path to the TemporaryItems folder differs on each Mac. If another user experienced the same issue (and they have), then I’d have to perform the same troubleshooting steps again. Automating this makes it far simpler to get the user’s issue resolved quickly and easily.