AppleScript bug in Word on Monterey: "print" command crashes Word

It appears there’s a severe AppleScript bug in Microsoft Word on Monterey. A user reported this and I can reproduce the bug on my machines. I wonder if someone who uses Word can confirm it?

The crash happens when passing any print settings properties when using the print command. Which makes the command pretty much useless.

Examples:

Word CRASHES with “Connection is invalid” error. The same will happen when using any number of properties:

tell application "Microsoft Word" to print document 1 with properties {copies:1}

Works (which is of no help as without the properties the script is useless):

tell application "Microsoft Word" to print document 1 with properties {}
tell application "Microsoft Word" to print document 1

There were no issues on pre-Monterey systems.

Confirmed. Crashes exactly as described in Monterey with Word. Also tried

tell application id "com.microsoft.word"

with the same result.

1 Like

And the same issue occurs in my Big Sur setup, with the latest version of Word. Perhaps this isn’t a Monterey bug but a bug recently added to Word?

1 Like

Ok thanks for the info!

I didn’t check on Big Sur indeed I just know that the script worked there when it was the current system.

In general, from my experience of the last fourteen years, scripting Office apps is constant struggle. New bugs pop up all the time for which new workarounds must be found, then old bugs get fixed but new ones appear, then old workarounds stop working and so on.

This bug seems to be the first one for which I can’t find any solution whatsoever.