XMLNodes.Add Method

Returns a XMLNode object that represents a newly added element.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Function Add ( _
    Name As String, _
    Namespace As String, _
    ByRef Range As Object _
) As XMLNode
'Usage
Dim instance As XMLNodes
Dim Name As String
Dim Namespace As String
Dim Range As Object
Dim returnValue As XMLNode

returnValue = instance.Add(Name, Namespace, _
    Range)
XMLNode Add(
    string Name,
    string Namespace,
    ref Object Range
)

Parameters

  • Name
    Type: System.String
    Required String. The name of the element in the XML schema designated in the Namespace parameter. Because XML is case-sensitive, the spelling of the element specified in the Name parameter must be exactly as it appears in the schema. If the String does not match any of the element names in the schema specified in the Namespace parameter, an error is displayed.
  • Namespace
    Type: System.String
    Required String. The name of the schema as defined in the schema. The Namespace parameter is case-sensitive and must be spelled exactly as it appears in the schema. If the specified namespace cannot be found in any of the schemas attached to the document, an error is displayed.
  • Range
    Type: System.Object%
    Optional Range. The range to which you want to apply the element. The default is to place the element tags at the insertion point or around the selection if a text is selected.

Return Value

Type: Microsoft.Office.Interop.Word.XMLNode

See Also

Reference

XMLNodes Interface

XMLNodes Members

Microsoft.Office.Interop.Word Namespace