Aracılığıyla paylaş


DocumentBase.Sections Özellik

Alır bir Sections gösteren belge bölümlerde koleksiyonu.

Ad alanı:  Microsoft.Office.Tools.Word
Derleme:  Microsoft.Office.Tools.Word.v4.0.Utilities (Microsoft.Office.Tools.Word.v4.0.Utilities.dll içinde)

Sözdizimi

'Bildirim
Public ReadOnly Property Sections As Sections
public Sections Sections { get; }

Özellik Değeri

Tür: Microsoft.Office.Interop.Word.Sections
A Sections gösteren belge bölümlerde koleksiyonu.

Örnekler

Aşağıdaki kod örneğinde belgede ilk paragrafa metin eklenir ve sonra metnin önüne yeni bir bölüm ekler.Bu örneği kullanmak için çalıştırın ThisDocument bir belge düzeyi projesinde sınıf.

Private Sub DocumentSections()
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Me.Paragraphs(1).Range.Text = "This is sample text."
    Dim Range As Object = Me.Paragraphs(1).Range

    Me.Sections.Add(Range)
End Sub 
private void DocumentSections()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    this.Paragraphs[1].Range.Text = "This is sample text.";
    object Range = this.Paragraphs[1].Range;

    this.Sections.Add(ref Range, ref missing);
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

DocumentBase Sınıf

Microsoft.Office.Tools.Word Ad Alanı