跳到主要内容

SetCreator

设置文档作者。

语法

expression.SetCreator(sCreator);

expression - 表示 ApiCore 类的变量。

参数

名称必需/可选数据类型默认值描述
sCreator必需string文档作者。

返回值

此方法不返回任何数据。

示例

使用文档中的核心属性设置当前文档的创建者。

// How to set creator for a core properties in a document?

// Set creator and display the result in a document.

const doc = Api.GetDocument();
const core = doc.GetCore();
core.SetCreator("John Smith");

const creator = core.GetCreator();
const paragraph = doc.GetElement(0);
paragraph.AddText("Creator: " + creator);