Start Word with Macro


Hi, I am very new to Electron here and am looking for advice on how to open Word and fire up a Macro.

At this point I can open Word but do not know how to pass the command-line switch to open the macro.
The command-line switch for this is ‘/mTHENAMEOFTHEMACRO’

Currently I am using:
var cp = require(“child_process”);

This opens the document I want to run the macro on.

How can I pass ‘/mTHENAMEOFTHEMACRO’ along with it?



This isn’t really an Electron question but a Node question. The documentation for Node’s child_process.exec has an example of how to run something with parameters.


Thanks leedohm, looks promising. Cheers!


leedohm, just a follow up - Worked like a charm and now I ‘get it’.
Thank you!


I’m glad to hear that things are working for you now :bow: