跳到主要内容

AddContentControlList

向文档添加空的内容控件列表。

语法

expression.AddContentControlList(type, List, commonPr);

expression - 表示 Api 类的变量。

参数

名称必需/可选数据类型默认值描述
type必需ContentControlType指定内容控件类型的数值。可以是以下值之一:1(组合框)、0(下拉列表)。
List可选ContentControlListElement[]内容控件元素列表,由两个项目组成:Display - 将在内容控件列表中向用户显示的项目,Value - 内容控件列表中每个项目的值。
commonPr可选ContentControlProperties{}通用内容控件属性。

返回值

此方法不返回任何数据。

示例

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