

Now we don't need to worry about any of that. Remember those conditions that we had to check for ("Does Microsoft Word have an existing front window? Is the 'Save' menu enabled?")? Remember how I said that ⌘ + S had one downside? Well, this AppleScript command doesn't have it. If you are navigating Word's menus when the AppleScript command is triggered, it will wait until the menu closes before running. If there is no active document, the AppleScript command will not cause any noticeable errors: no system beep, nothing. It does not require Microsoft Word to be active (front-most) in order for it to work, nor does it bring Microsoft Word to the front when it runs. This AppleScript command is nearly magic for three reasons:
#Iword keyboards mac#
So how can we do this? The answer is AppleScript:ĭuring the Mac Power Users episode, David mentioned several times that Microsoft Office has great AppleScript support, and he even mentioned Ben Waldie whose article is where I found this simple AppleScript command which tells Microsoft Word to save its current document. We have now discovered something called an infinite loop, and I don't mean the address in Cupertino. which will trigger the Keyboard Maestro macro to run again. then what happens? Well, either a) Keyboard Maestro leaves you in Word, which isn't what you wanted, or b) it switches you to away to another app. The reason it won't work is obvious once you think about it: you switch away to another app, then Keyboard Maestro switches back to Word to save.

I learned this one the hard way with another app.

Couldn't we tell Keyboard Maestro to use the menu item for Word, even after Word is no longer the front-most app? Saving your document while you are using Word is great, but what happens when you switch to another app? If you have been editing that Word document for at least a minute, it should have saved a recent copy, but wouldn't it be great if you could save every time you switched away from Word?īut how? Obviously once we have switched away from Word, pressing ⌘ + S isn't going to save the current word document. Auto-Save Microsoft Word when you switch to another app The only downside to this is that if you are navigating through Microsoft Word's menus at the same time that the macro runs, the menu will close, but the same problem will occur if we tell our macro to use the menu item File » Save. So I recommend having Keyboard Maestro use keyboard shortcuts when it makes sense to do so. However, ⌘ + S is perfectly clear, and it should prevent the macro from causing any problems if I happen to be typing when it runs. Most times I prefer to have Keyboard Maestro use the file menu, rather than keyboard shortcuts, because it's easier to understand what the macro is doing when I'm reviewing them in Keyboard Maestro. You can do this one of two ways in Keyboard Maestro:Ĭhoose the menu item "Save" under the "File" menu, or The second is the action which actually saves the document. After awhile, that might get annoying, but I suggest using it until you get used to the idea, as it will help reinforce the fact that the macro is actually running. The first is a notification which will appear and inform the user that the macro is running. Next we get to the actions section, and I included two here, although many people might choose to delete one of them. Here is how those two conditions appear in Keyboard Maestro: That is not true in all apps, so if you implement this macro for another app, you may want to check that a button "Save" does not exist. Note that when the "Save As" window is open in Microsoft Word, the "Save" menu is disabled. The front window of Microsoft Word exists (this means that there is an open document window in Word)Ī menu item "Save" is enabled (you'd find it under the "File" menu) However, with Keyboard Maestro I don't have to just blindly save every sixty seconds, I can check specific criteria. The macro is designed to run only when Microsoft Word is active, and I set mine to run every minute. Keyboard Maestro can run that save command every X seconds or minutes.

Unlike modern apps, Microsoft Word does not support the versioning and auto-save features in OS X. Microsoft Word does have an auto-recovery setting, but nothing beats the security of manually saving. Not now Turn on Turned on Turn on Auto-Save every X minutes (or seconds) This probably is not what you want, although there is no harm in setting it. You can disable notifications at any time in your settings menu.
