DocumentBase.SummaryLength (Propiedad)
Obtiene o establece la longitud del resumen como un porcentaje de la longitud del documento.
Espacio de nombres: Microsoft.Office.Tools.Word
Ensamblado: Microsoft.Office.Tools.Word.v4.0.Utilities (en Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Sintaxis
'Declaración
Public Property SummaryLength As Integer
public int SummaryLength { get; set; }
Valor de propiedad
Tipo: System.Int32
La longitud del resumen como un porcentaje de la longitud del documento.
Comentarios
Cuanto mayor sea el número, más detalle se incluye en el resumen.
Esta propiedad tendrá efecto inmediatamente si se muestra la barra de herramientas Autorresumen; de lo contrario, tendrá efecto la siguiente vez que se aplique el método AutoSummarize o la propiedad SummaryViewMode al documento.
Ejemplos
En el ejemplo de código siguiente se agrega texto al primer párrafo del documento.A continuación, el código muestra el resumen y establece un nivel de detalle de 50 por ciento.Para usar este ejemplo, ejecútelo desde la clase ThisDocument en un proyecto de nivel de documento.
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;
}
Seguridad de .NET Framework
- Plena confianza para el llamador inmediato. Un código de confianza parcial no puede utilizar este miembro. Para obtener más información, vea Utilizar bibliotecas de código que no es de plena confianza.