Last active
January 6, 2023 21:18
-
-
Save tjluoma/ca9bcbe0d905a759442f to your computer and use it in GitHub Desktop.
I use this with a Keyboard Maestro macro that runs whenever MSWord “deactivates” (in Keyboard Maestro terms). Updated with comments from http://apple.stackexchange.com/a/132171/9226
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
on hasDocument() | |
tell application "Microsoft Word" | |
every document is not missing value | |
end tell | |
end hasDocument | |
tell application "Microsoft Word" | |
if it is running and my hasDocument() then | |
save active document | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi TJ - I did delete the first version :-) it didn't take account of the fact that .active_document can return missing value even when the document list is not empty ...
罗斌洲