Characters Collection Object

Multiple objects
Multiple objects

A collection of characters in a selection, range, or document. There is no Character object; instead, each item in the Characters collection is a Range object that represents one character.

Using the Characters Collection

Use the Characters property to return the Characters collection. The following example displays how many characters are selected.

MsgBox Selection.Characters.Count & " characters are selected"

Use Characters(index), where index is the index number, to return a Range object that represents one character. The index number represents the position of a character in the Characters collection. The following example formats the first letter in the selection as 24-point bold.

With Selection.Characters(1)
    .Bold = True
    .Font.Size = 24
End With


The Count property for this collection in a document returns the number of items in the main story only. To count items in other stories use the collection with the Range object.

An Add method isn't available for the Characters collection. Instead, use the InsertAfter or InsertBefore method to add characters to a Range object. The following example inserts a new paragraph after the first paragraph in the active document.

With ActiveDocument
    .Paragraphs(2).Range.InsertBefore "New Text"
End With

Properties | Application Property | Count Property | Creator Property | First Property | Last Property | Parent Property

Methods | Item Method

Parent Objects | Document | Range | Selection

Child Objects | Bookmarks | Borders | Cells | Characters | Columns | Comments | Document | Editors | EndnoteOptions | Endnotes | Fields | Find | Font | FootnoteOptions | Footnotes | FormFields | Frames | HTMLDivisions | Hyperlinks | InlineShapes | ListFormat | ListParagraphs | PageSetup | ParagraphFormat | Paragraphs | ProofreadingErrors | Range | ReadabilityStatistics | Revisions | Rows | Sections | Sentences | Shading | ShapeRange | SmartTags | Subdocuments | SynonymInfo | Tables | TextRetrievalMode | Words | XMLNode | XMLNodes

See Also | Sentences Collection Object | Words Collection Object