Skip to main content

SetVersion

Sets the document version.

Syntax

expression.SetVersion(sVersion);

expression - A variable that represents a ApiCore class.

Parameters

NameRequired/OptionalData typeDefaultDescription
sVersionRequiredstringThe document version.

Returns

This method doesn't return any data.

Example

This example demonstrates how to set the version of the current document.

const doc = Api.GetDocument();
const core = doc.GetCore();
core.SetVersion("v9.0");

const version = core.GetVersion();
let paragraph = doc.GetElement(0);
paragraph.AddText("Version: " + version);