SetTitle
Sets the document title.
Syntax
expression.SetTitle(sTitle);
expression
- A variable that represents a ApiCore class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
sTitle | Required | string | The document title. |
Returns
This method doesn't return any data.
Example
This example demonstrates how to set the title of the current document.
- Code
- Result
const doc = Api.GetDocument();
const core = doc.GetCore();
core.SetTitle("My Document Title");
const title = core.GetTitle();
let paragraph = doc.GetElement(0);
paragraph.AddText("Title: " + title);