共用方式為


XMLNode.PlaceholderText Property

Word Developer Reference

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

Syntax

expression.PlaceholderText

expression   An expression that returns an XMLNode object.

Remarks

Placeholder text is displayed in Microsoft Office 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 what text to display when tags are not displayed in the document.

Visual Basic for Applications
  Dim objNode As XMLNode

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

objNode.PlaceholderText = "Enter Book Information Here"

See Also