XMLNode.Range Property (2007 System)
Gets a Range object that represents the portion of a document that is contained in the XMLNode control.
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 Range As Range
'Usage
Dim instance As XMLNode
Dim value As Range
value = instance.Range
[BrowsableAttribute(false)]
public Range Range { get; }
[BrowsableAttribute(false)]
public:
property Range^ Range {
Range^ get ();
}
public function get Range () : Range
Property Value
Type: Range
A Range object that represents the portion of a document that is contained in the XMLNode control.
Examples
The following code example uses the Range property to set the font and apply bold formatting to the text in an XMLNode. This example assumes that the current document contains an XMLNode named CustomerLastNameNode.
Private Sub FormatNodeText()
Me.CustomerLastNameNode.NodeText = "Smith"
Me.CustomerLastNameNode.Range.Bold = 1
Me.CustomerLastNameNode.Range.Font.Name = "Arial"
End Sub
private void FormatNodeText()
{
this.CustomerLastNameNode.NodeText = "Smith";
this.CustomerLastNameNode.Range.Bold = 1;
this.CustomerLastNameNode.Range.Font.Name = "Arial";
}
.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.