PlaceholderText Property

Microsoft Word Visual Basic

PlaceholderText Property

Sets or returns a String that represents the text displayed for an element that contains no text.

expression.PlaceholderText

expression    Required. An expression that returns an XMLNode object.

Remarks

Placeholder text is displayed in Microsoft Word only when the Show XML tags in the document check box in the XML Structure task pane is cleared. The Show XML tags in the document check box corresponds to the ShowXMLMarkup property.

Example

The following example inserts a new element into the active document at the insertion point and sets the text to display when tags are not displayed in the document.

    Dim objNode As XMLNode

Set objNode = Selection.XMLNodes.Add("catalog", "book")

objNode.PlaceholderText = "Enter Book Information Here"