Share via


ContentControl.ShowingPlaceholderText Property

Word Developer Reference

Returns a Boolean that indicates whether the placeholder text for the content control is displayed. Read-only.

Syntax

expression.ShowingPlaceholderText

expression   An expression that returns a ContentControl object.

Example
The following example inserts a new drop-down list content control into the active document, sets the title and the placeholder text if the placeholder text is showing, and then adds several new items to the list.

Visual Basic for Applications
  Dim objCC As ContentControl
Dim objMap As XMLMapping

Set objCC = ActiveDocument.ContentControls.Add(wdContentControlDropdownList) objCC.Title = "My Favorite Animal" If objCC.ShowingPlaceholderText Then _ objCC.SetPlaceholderText , , "Select your favorite animal "

'List entries objCC.DropdownListEntries.Add "Cat" objCC.DropdownListEntries.Add "Dog" objCC.DropdownListEntries.Add "Horse" objCC.DropdownListEntries.Add "Monkey" objCC.DropdownListEntries.Add "Snake" objCC.DropdownListEntries.Add("Other")

See Also