次の方法で共有


DocumentBase.Paragraphs Property

Definition

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

public:
 property Microsoft::Office::Interop::Word::Paragraphs ^ Paragraphs { Microsoft::Office::Interop::Word::Paragraphs ^ get(); };
public Microsoft.Office.Interop.Word.Paragraphs Paragraphs { get; }
member this.Paragraphs : Microsoft.Office.Interop.Word.Paragraphs
Public ReadOnly Property Paragraphs As Paragraphs

Property Value

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