Work around Microsoft Word "grant access" message? (solved)

I have a script that opens an ODT document in Microsoft Word, using this code:

tell application "Finder"
		set wordID to get application file id "com.microsoft.Word"
		set wordApp to wordID as alias
		open myDoc using wordApp
end tell

This always brings up a dialog that says I need to Grant Access to open the file in the myDoc variable. I can’t prevent the dialog from appearing by giving Word Full Disk Access. And I can’t prevent it by creating the myDoc file in the Documents folder or the user’s temporary folder. Is there something obvious that I’m missing?

EDIT: Well, I solved this myself by replacing that complicated code with this simpler version. I can’t imagine why I didn’t use it before.

tell application "Microsoft Word"
		open myDoc
end tell