次の方法で共有


Document.Paragraphs プロパティ (2007 System)

更新 : 2007 年 11 月

文書内のすべての段落を表す Paragraphs コレクションを取得します。

名前空間 :  Microsoft.Office.Tools.Word
アセンブリ :  Microsoft.Office.Tools.Word.v9.0 (Microsoft.Office.Tools.Word.v9.0.dll 内)

構文

'宣言
<BrowsableAttribute(False)> _
Public ReadOnly Property Paragraphs As Paragraphs
'使用
Dim instance As Document
Dim value As Paragraphs

value = instance.Paragraphs
[BrowsableAttribute(false)]
public Paragraphs Paragraphs { get; }

プロパティ値

型 : Microsoft.Office.Interop.Word.Paragraphs

文書内のすべての段落を表す Paragraphs コレクション。

文書の最初の段落にテキストを追加するコード例を次に示します。

この例は、ドキュメント レベルのカスタマイズ用に作成されています。

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.";
}

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

Document クラス

Document メンバ

Microsoft.Office.Tools.Word 名前空間