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)

Usage

Dim Name As String
Dim Namespace As String
Dim Range As Object
Dim returnValue As XMLNode
Dim xMLNodes1 As XMLNodes
returnValue = xMLNodes1.Add(Name, Namespace, Range)

Syntax

Function Add( _
    <InAttribute()> ByVal Name As String, _
    <InAttribute()> ByVal Namespace As String, _
    <InAttribute()> Optional ByRef Range As Object _
) As XMLNode
XMLNode Add(
    [In] string Name, 
    [In] string Namespace, 
    [In, Optional] ref object Range
);
public: XMLNode^ Add(
    String^ Name, 
    String^ Namespace, 
    &Object^ Range
);
public XMLNode Add(
    /*in*/System.String Name, 
    /*in*/System.String Namespace, 
    /*in*/System.Object Range
);
function Add(
     Name : String, 
     Namespace : String, 
     Range : Object
) : XMLNode;

Parameters

  • Name
    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
    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
    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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

XMLNodes Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

XMLNodes Members