Share via

AppleScript broken for documents saved on OneDrive (regression in Word 15.15)

Anonymous
2015-10-31T20:49:00+00:00

As of Word 15.15, trying to use AppleScript when the active document is a document that was opened from OneDrive, "active document" does not work, e.g.:

$ osascript -e 'tell application "Microsoft Word" to name of active document'

missing value

This works fine on Word 15.13.1, and it works fine in Word 15.15 for documents not opened from OneDrive, or for documents that were saved on OneDrive but not loaded from there. As far as I can tell, the only way to get a document object for a document on OneDrive in Word 15.15 is by index:

$ osascript -e 'tell application "Microsoft Word" to name of document 1'

Test.docx

but this is only a viable strategy when the active document is the only document open. Accessing documents on OneDrive by name is also broken:

$ osascript -e 'tell application "Microsoft Word" to document "Test.docx"'

37:57: execution error: Microsoft Word got an error: The object you are trying to access does not exist (-1728)

This affects our Add-In, which uses AppleScript for communication with Word; see our forum here. I just want to make sure this is on Microsoft's radar and will be fixed in a forthcoming point release.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2015-11-01T07:49:14+00:00

    You can probably submit this as a feedback.

    Use the feedback tool in the upper-right corner of your app to send feedback directly to our team.

    Was this answer helpful?

    0 comments No comments