XmlMappedRange.Characters Property (2007 System)

Gets a Characters object that represents a range of characters within the text of the XmlMappedRange control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Characters As XmlMappedRange._CharactersType
'Usage
Dim instance As XmlMappedRange 
Dim value As XmlMappedRange._CharactersType 

value = instance.Characters
[BrowsableAttribute(false)]
public XmlMappedRange._CharactersType Characters { get; }
[BrowsableAttribute(false)]
public:
property XmlMappedRange._CharactersType^ Characters {
    XmlMappedRange._CharactersType^ get ();
}
public function get Characters () : XmlMappedRange._CharactersType

Property Value

Type: Microsoft.Office.Tools.Excel.XmlMappedRange._CharactersType
A Characters object that represents a range of characters within the text of the XmlMappedRange control.

Remarks

The Characters property is intended to be used with the following parameters.

Parameter

Description

Start

The first character to be returned. If this argument is either 1 or omitted, this property returns a range of characters starting with the first character.

Length

The number of characters to be returned. If this argument is omitted, this property returns the remainder of the string (everything after the Start character).

If you attempt to use Characters without specifying any parameters, Characters will get an XmlMappedRange._CharactersType object that is part of the Visual Studio Tools for Office infrastructure and is not intended to be used directly from your code.

You can use the Characters object to format characters within a text string.

The Characters object is not a collection.

Optional Parameters

For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.

Examples

The following code example uses the Characters property to apply bold formatting to the first character in the text of an XmlMappedRange. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

Private Sub FormatCharacters()
    Me.CustomerLastNameCell.Characters(1, 1).Text = "Smith" 
    Me.CustomerLastNameCell.Characters(1, 1).Font.Bold = True 
End Sub
private void FormatCharacters()
{
    this.CustomerLastNameCell.Characters[1, 1].Text = "Smith";
    this.CustomerLastNameCell.Characters[1, 1].Font.Bold = true;
}

.NET Framework Security

See Also

Reference

XmlMappedRange Class

XmlMappedRange Members

Microsoft.Office.Tools.Excel Namespace