Document.Paragraphs Property (2007 System)
Gets a Paragraphs collection that represents all the paragraphs in the document.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Paragraphs As Paragraphs
'Usage
Dim instance As Document
Dim value As Paragraphs
value = instance.Paragraphs
[BrowsableAttribute(false)]
public Paragraphs Paragraphs { get; }
[BrowsableAttribute(false)]
public:
property Paragraphs^ Paragraphs {
Paragraphs^ get ();
}
public function get Paragraphs () : Paragraphs
Property Value
Type: 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.
This example is for a document-level customization.
Private Sub DocumentParagraphs()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Me.Paragraphs(1).Range.Text = "This is sample paragraph text."
End Sub
private void DocumentParagraphs()
{
this.Paragraphs[1].Range.InsertParagraphBefore();
this.Paragraphs[1].Range.Text = "This is sample paragraph text.";
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.