ContentControl.SetPlaceholderText Method
Word Developer Reference |
Sets the placeholder text that displays in the content control until a user enters their own text.
Syntax
expression.SetPlaceholderText(BuildingBlock, Range, Text)
expression An expression that returns a ContentControl object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
BuildingBlock | Optional | BuildingBlock | Specifies a BuildingBlock object that contains the contents of the placeholder text. |
Range | Optional | Range | Specifies a Range object that contains the contents of the placeholder text. |
Text | Optional | String | Specifies the contents of the placeholder text. |
Remarks
Only one of the parameters is used when specifying placeholder text. If more than one parameter is used, Microsoft Office Word uses the text specified in the first parameter. If all parameters are omitted, the placeholder text is blank.
Example
The following example inserts a new drop-down list content control into the active document, sets the title and placeholder text, and then inserts several new items into the list.
Visual Basic for Applications |
---|
|
See Also
- ContentControl Object
- ContentControl Object Members
- How to: Bind a Content Control to a Node in the Data Store
- How to: Bind Controls to a Specific Row in the Data Store When Inserting a Building Block
- How to: Change a Content Control from One Type to Another
- How to: Change the Editability of a Content Control
- How to: Filter the Building Block List in a Content Control
- How to: Insert a Content Control into a Building Block
- How to: Remove Data from the Data Store When Deleting a Content Control
- How to: Set the Building Blocks That You Can Use for a Content Control
- Walkthrough: Connect an Item in the Data Store to a SQL Server Database
- Walkthrough: Connect an Item in the Data Store to a Web Service
- Walkthrough: Connect an Item in the Data Store to an Access Database
- Walkthrough: Connect an Item in the Data Store to an Excel Workbook
- Working with Content Controls