PlaceholderText Property

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


expression Required. An expression that returns an XMLNode object.


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.


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"

Applies to | XMLNode Object