app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
Just make sure to set this back to:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
when the script finishes!
Moving discussion to InDesign Scripting forum
Thanks. The command was
set user interaction level of script preferences to never interact
Stick to js as much as you can. When you need to call excel with applescript, use doScript and only for that