Get Started
Plugins
Macros
More information

window.Asc.plugin.executeMethod ("GetAllOleObjects", [args], callback)

Description

Defines the method that allows getting all OLE object data for objects which can be opened by the specified plugin. If sPluginId is not defined, this method returns all OLE objects contained in the currrent document.

Usage

This method should be used in the following way:

window.Asc.plugin.executeMethod ("GetAllOleObjects", [sPluginId]);
Parameters
Parameter Description Type Example
sPluginId Plugin identifier. It must be of the asc.{UUID} type. string "asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}"
Returns

The method returns an array of the OLEObjectData objects containing the data about the OLE object parameters:

{
    "Data" : string,
    "ImageData" : string,
    "ApplicationId" : string,
    "InternalId" : string,
    "ParaDrawingId" : string,
    "Width" : integer,
    "Height" : integer,
    "WidthPix" : integer,
    "HeightPix" : integer
}
Parameters
Parameter Description Type Example
Data OLE object data (internal format). string "{data}"
ImageData An image in the base64 format stored in the OLE object and used by the plugin. string "data:image/png;base64,image-in-the-base64-format"
ApplicationId An identifier of the plugin which can edit the current OLE object and must be of the asc.{UUID} type. string "asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}"
InternalId The OLE object identifier which is used to work with OLE object added to the document. string "5_556"
ParaDrawingId An identifier of the drawing object containing the current OLE object. string "1_713"
Width The OLE object width measured in millimeters. integer 70
Height The OLE object height measured in millimeters. integer 70
WidthPix The OLE object image width in pixels. integer 60 * 36000
HeightPix The OLE object image height in pixels. integer 60 * 36000
Example
window.Asc.plugin.executeMethod("GetAllOleObjects", ["asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}"]);