Edit

Word.AutoMacro enum

Indicates the auto macros that can run automatically in Word.

Remarks

API set: WordApiDesktop 1.4

Used by

Examples

await Word.run(async (context) => {
    const wordDocument: Word.Document = context.document;
    const autoMacro: Word.AutoMacro = Word.AutoMacro.open;
    wordDocument.runAutoMacro(autoMacro);
    await context.sync();

    console.log("Requested the AutoOpen macro.");
});

Fields

close = "Close"

Indicates that the macro runs automatically when the document is closed.

exit = "Exit"

Indicates that the macro runs automatically when the document is saved.

new = "New"

Indicates that the macro runs automatically when a new document is created.

open = "Open"

Indicates that the macro runs automatically when the document is opened.

startWord = "StartWord"

Indicates that the macro runs automatically when Word starts.

sync = "Sync"

Indicates that the macro runs automatically when the document is synchronized.