Freigeben über


Paragraph Object

Word Developer Reference

Represents a single paragraph in a selection, range, or document. The Paragraph object is a member of the Paragraphs collection. The Paragraphs collection includes all the paragraphs in a selection, range, or document.

Remarks

Use Paragraphs(Index), where Index is the index number, to return a single Paragraph object. The following example right aligns the first paragraph in the active document.

Visual Basic for Applications
  ActiveDocument.Paragraphs(1).Alignment = wdAlignParagraphRight

Use the Add, InsertParagraph, InsertParagraphAfter, or InsertParagraphBefore method to add a new, blank paragraph to a document. The following example adds a paragraph mark before the first paragraph in the selection.

Visual Basic for Applications
  Selection.Paragraphs.Add Range:=Selection.Paragraphs(1).Range

The following example also adds a paragraph mark before the first paragraph in the selection.

Visual Basic for Applications
  Selection.Paragraphs(1).Range.InsertParagraphBefore

See Also