Opening Multiple MSWord Documents Disables Word Macros

Discussion, questions and support.
Post Reply
User avatar
=Jagz=
Posts: 12
Joined: Jun 22nd, ’16, 23:21

Post by =Jagz= » Sep 4th, ’21, 18:24

I created a menu item to open multiple Word documents that used to work. Recently it caused Word to give the error message
"The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros."

I originally got around it by adding a pause to the script, but now this no longer works.
I'm using MS Word 2016

Here's an example of the script using Open:
C:\Users\xxx\OneDrive\Documents\Document1.docx
{10000}
C:\Users\xxx\OneDrive\Documents\Document2.docx

Got any ideas to fix this?
User avatar
Marko
Posts: 1718
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Sep 4th, ’21, 19:22

Pause will not work in Open (or Run).
You could try Type: Command

Code: Select all

Run, C:\Users\xxx\OneDrive\Documents\Document1.docx
Sleep, 1000
Run, C:\Users\xxx\OneDrive\Documents\Document2.docx
Post Reply