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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。