DocumentBase.Paragraphs Property

Definition

Gets a Paragraphs collection that represents all the paragraphs in the document.

public Microsoft.Office.Interop.Word.Paragraphs Paragraphs { get; }

Property Value

Paragraphs

A Paragraphs collection that represents all the paragraphs in the document.

Examples

The following code example adds text to the first paragraph in the document. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentParagraphs()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    this.Paragraphs[1].Range.Text = "This is sample paragraph text.";
}
Private Sub DocumentParagraphs()
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Me.Paragraphs(1).Range.Text = "This is sample paragraph text."
End Sub 

Applies to