window.Asc.plugin.executeMethod("GetMacros", callback)

Description

Defines the method that allows getting the document macros.

Usage

This method should be used in the following way:

window.Asc.plugin.executeMethod("GetMacros");
Returns

The method returns a Macros object containing the data about all the macros from the document in the following form (JSON):

{
    "macrosArray" : "string[]",
    "current" : number
}

The Macros object can have the following values:

  • "macrosArray" (e.g. {"macrosArray": [{"name": "Macros1", "value": "{macrosCode}"}]} ) is an array of macros codes;
  • "current" (e.g. {"current": 1} ) is a current macros index.