Expand Minimize
This topic has not yet been rated - Rate this topic

DocumentBase.Paragraphs Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
public Paragraphs Paragraphs { get; }

Property Value

Type: Microsoft.Office.Interop.Word.Paragraphs
A Paragraphs collection that represents all the paragraphs in the document.

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.";
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.