DocumentBase.Paragraphs Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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