Document.ChildNodeSuggestions Property (Word)
Returns an XMLChildNodeSuggestions collection that represents the list of allowed elements for the document.
Syntax
expression .ChildNodeSuggestions
expression Required. A variable that represents a Document object.
Remarks
This property returns the root elements for all attached schemas.
Each XMLChildNodeSuggestion object in a XMLChildNodeSuggestions collection is an item in the list of allowed possible XML elements at the bottom of the XML Structure task pane.
Example
The following example loops through the suggestions for the first element selected in the active document and inserts all allowed elements at the insertion point position.
Sub GetChildNodeSuggestions()
Dim objSuggestion As XMLChildNodeSuggestion
Dim objNode As XMLNode
Set objNode = Selection.XMLParentNode
For Each objSuggestion In objNode.ChildNodeSuggestions
objSuggestion.Insert
Selection.MoveRight
Next
End Sub