PlainTextContentControl.SetPlaceholderText Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Displays text that is in a BuildingBlock, a Range, or a string as the placeholder text in the PlainTextContentControl.
public void SetPlaceholderText (Microsoft.Office.Interop.Word.BuildingBlock BuildingBlock = default, Microsoft.Office.Interop.Word.Range Range = default, string Text = "");
abstract member SetPlaceholderText : Microsoft.Office.Interop.Word.BuildingBlock * Microsoft.Office.Interop.Word.Range * string -> unit
Public Sub SetPlaceholderText (Optional BuildingBlock As BuildingBlock = Nothing, Optional Range As Range = Nothing, Optional Text As String = "")
Parameters
- BuildingBlock
- BuildingBlock
A BuildingBlock that contains the placeholder text.
- Text
- String
The placeholder text.
Remarks
The placeholder text is displayed until a user edits the control, the control is populated with data from a data source, or the control's contents are deleted.
Only one of the parameters is used when you call the SetPlaceholderText method. If more than one parameter is specified, Microsoft Office Word uses the first specified parameter. If all parameters are omitted, the placeholder text is an empty string.
To get the placeholder text of a PlainTextContentControl, use the PlaceholderText property. You can also use this property to set the placeholder text to a string.