Paragraphs (collection)

<< Click to Display Table of Contents >>

Paragraphs (collection)

Access paths:

Application à Documents à Item à Paragraphs

Application à ActiveDocument à Paragraphs

 1  Description

Paragraphs is a collection of all paragraphs in a document. The individual elements of this collection are of the type Paragraph.

 2  Access to the collection

Each open document has exactly one instance of the Paragraphs collection. It is accessed through Document.Paragraphs:

' Show the number of paragraphs in the current document

MsgBox tm.ActiveDocument.Paragraphs.Count

 3  Properties, objects, collections and methods

Properties:

Count R/O

 

Objects:

Item Paragraph (default object)

Application Application

Parent Document

Count (property, R/O)

Data type: Long

Returns the number of Paragraph objects in the document – in other words: the number of paragraphs in the document.

Item (pointer to object)

Data type: Object

Returns an individual Paragraph object, i.e. an individual paragraph.

Which Paragraph object you get depends on the numeric value that you pass to Item: 1 for the first paragraph in the document, 2 for the second, etc.

Application (pointer to object)

Data type: Object

Returns the Application object.

Parent (pointer to object)

Data type: Object

Returns the parent object, i.e. an object of the type Document.