DocumentBase.Sentences Özellik
Alır bir Sentences belgedeki tüm cümlelerin temsil eden 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 Sentences As Sentences
public Sentences Sentences { get; }
Özellik Değeri
Tür: Microsoft.Office.Interop.Word.Sentences
A Sentences belgedeki tüm cümlelerin temsil eden koleksiyonu.
Örnekler
Aşağıdaki kod örneği, iki cümle belgeye ekler ve ardından belgede cümle sayısını gösteren bir ileti görüntüler.Bu örneği kullanmak için çalıştırın ThisDocument bir belge düzeyi projesinde sınıf.
Private Sub DocumentSentences()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Me.Paragraphs(1).Range.Text = "This is sample text." & _
" There are two sentences in this document."
MessageBox.Show("Total sentences: " & Me.Sentences.Count.ToString())
End Sub
private void DocumentSentences()
{
this.Paragraphs[1].Range.InsertParagraphBefore();
this.Paragraphs[1].Range.Text = "This is sample text." +
" There are two sentences in this document.";
MessageBox.Show("Total sentences: " +
this.Sentences.Count.ToString());
}
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. Kısmen güvenilen kod kitaplıklarını kullanma.