AddContentControlList

AddContentControlList(type, [List], [commonPr])

Adds an empty content control list to the document.

Parameters:

Name Type Default Description
type ContentControlType

A numeric value that specifies the content control type. It can have one of the following values: 1 (combo box), 0 (dropdown list).

List Array.<String, String> [{Display, Value}]

A list of the content control elements that consists of two items: Display - an item that will be displayed to the user in the content control list, Value - a value of each item from the content control list.

commonPr ContentControlProperties {}

The common content control properties.

Returns:

This method doesn't return any data.

Example

Copy code
window.Asc.plugin.executeMethod ("AddContentControlList", [0,
    [
        {
            "Display": "Item1_D",
            "Value": "Item1_V"
        },
        {
            "Display": "Item2_D",
            "Value": "Item2_V"
        }
    ], 
    {
        "Id" : 7,
        "Tag" : "{tag}",
        "Lock" : 0
    }
]);