Table of contents
TOC
Collapse the table of content
Expand the table of content

TextRange.Paragraphs Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns a TextRange object that represents the specified paragraphs.

Syntax

expression. Paragraphs( Start, Length)

_expression_A variable that represents a TextRange object.

Parameters

NameRequired/OptionalData TypeDescription
StartRequiredLongThe first paragraph in the returned range.
LengthOptionalLongThe number of paragraphs to be returned. Default is 1.

Return Value

TextRange

Example

If Length is omitted, the returned range contains one paragraph.

If Length is greater than the number of paragraphs from the specified starting paragraph to the end of the text, the returned range contains all those paragraphs.

This example formats as indents the first line of the selected paragraph.

Sub FormatCurrentParagraph() 
 Selection.TextRange.Paragraphs(Start:=1).ParagraphFormat _ 
 .FirstLineIndent = InchesToPoints(0.5) 
End Sub
© 2018 Microsoft