DocumentBase.ChildNodeSuggestions Property

Gets an XMLChildNodeSuggestions collection that represents the list of allowed elements for the DocumentBase (which returns the root elements for all attached schemas) or for the XMLNode object (which returns the child elements of a specified element).

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntax

'Declaration
Public ReadOnly Property ChildNodeSuggestions As XMLChildNodeSuggestions
public XMLChildNodeSuggestions ChildNodeSuggestions { get; }

Property Value

Type: Microsoft.Office.Interop.Word.XMLChildNodeSuggestions
An XMLChildNodeSuggestions collection.

Remarks

Each XMLChildNodeSuggestion in an XMLChildNodeSuggestions collection is an item in the list of allowed possible XML elements at the bottom of the XML Structure task pane.

Examples

The following code example uses the ChildNodeSuggestions property to add an XML element to the document for each of the root elements of the schemas attached to the document. To use this example, run it from the ThisDocument class in a document-level project.

Private Sub DocumentChildNodeSuggestions()
        Dim suggestion As Word.XMLChildNodeSuggestion
        For Each suggestion In Me.ChildNodeSuggestions
            suggestion.Insert()
        Next suggestion
    End Sub
private void DocumentChildNodeSuggestions()
{
    foreach (Word.XMLChildNodeSuggestion suggestion in 
        this.ChildNodeSuggestions)
    {
        suggestion.Insert(ref missing);
    }
}

.NET Framework Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace