SetPlaceholderText

SetPlaceholderText(sText) → { boolean }

Sets the placeholder text to the current content control.

Parameters:

Name Type Description
sText string

The text that will be set to the current content control.

Returns:

Type
boolean

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oBlockLvlSdt = Api.CreateBlockLvlSdt();
oDocument.AddElement(0, oBlockLvlSdt);
oBlockLvlSdt.SetPlaceholderText("Name");
builder.SaveFile("docx", "SetPlaceholderText.docx");
builder.CloseFile();

Resulting document