Document.ChildNodeSuggestions Property (2007 System)
Gets an XMLChildNodeSuggestions collection that represents the list of allowed elements for the Document (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.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property ChildNodeSuggestions As XMLChildNodeSuggestions
'Usage
Dim instance As Document
Dim value As XMLChildNodeSuggestions
value = instance.ChildNodeSuggestions
[BrowsableAttribute(false)]
public XMLChildNodeSuggestions ChildNodeSuggestions { get; }
[BrowsableAttribute(false)]
public:
property XMLChildNodeSuggestions^ ChildNodeSuggestions {
XMLChildNodeSuggestions^ get ();
}
public function get ChildNodeSuggestions () : XMLChildNodeSuggestions
Property Value
Type: 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.
This example is for a document-level customization.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.