Please make sure these security settings are turned on:
1. In System Preferences on your Mac, go to Security & Privacy and click on Privacy. Find Automation in the list on the left of the window and under Read&Write ensure there is a tick for Microsoft Word.
2. Also in System Preferences > Security & Privacy, under Accessibility, make sure that there is a tick beside Read&Write.
3. In System Preference > Security & Privacy > Screen Recording, make sure there is a tick beside Read&Write.