DocumentBase.SummaryViewMode 屬性
取得或設定摘要的顯示方式。
命名空間: Microsoft.Office.Tools.Word
組件: Microsoft.Office.Tools.Word.v4.0.Utilities (在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)
語法
'宣告
Public Property SummaryViewMode As WdSummaryMode
public WdSummaryMode SummaryViewMode { get; set; }
屬性值
型別:Microsoft.Office.Interop.Word.WdSummaryMode
其中一個 WdSummaryMode 值。
備註
此屬性對應到 [自動摘要] 對話方塊中的 [摘要類型] 選項。
範例
下列程式碼範例會將文字加入至文件的第一個段落。 然後程式碼會顯示摘要,並且將詳細程度設定為百分之 50。 若要使用這個範例,請在文件層級專案中的 ThisDocument 類別執行。
Private Sub DocumentSummaryLength()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Me.Paragraphs(1).Range.Text = "The SummaryLength property" & _
" returns or sets the length of the summary as a " & _
" percentage of the document length. The larger the number," & _
" the more detail that's included in the summary."
Me.SummaryViewMode = Word.WdSummaryMode.wdSummaryModeHighlight
Me.ShowSummary = True
Me.SummaryLength = 50
End Sub
private void DocumentSummaryLength()
{
this.Paragraphs[1].Range.InsertParagraphBefore();
this.Paragraphs[1].Range.Text = "The SummaryLength property"
+ " returns or sets the length of the summary as a "
+ " percentage of the document length. The larger the number,"
+ " the more detail that's included in the summary.";
this.SummaryViewMode = Word.WdSummaryMode.wdSummaryModeHighlight;
this.ShowSummary = true;
this.SummaryLength = 50;
}
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。