Proprietà Document.Frames (System 2007)

Aggiornamento: novembre 2007

Ottiene un insieme di Frames che rappresenta tutti i frame del documento.

Spazio dei nomi:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Sintassi

<BrowsableAttribute(False)> _
Public ReadOnly Property Frames As Frames

Dim instance As Document
Dim value As Frames

value = instance.Frames
[BrowsableAttribute(false)]
public Frames Frames { get; }

Valore proprietà

Tipo: Microsoft.Office.Interop.Word.Frames

Insieme di Frames che rappresenta tutti i frame del documento.

Esempi

Nell'esempio di codice riportato di seguito viene illustrato come aggiungere testo al primo paragrafo e un frame di testo al testo. Infine viene illustrato come modificare il bordo del frame di testo in wdLineStyleDouble.

Questo esempio è per una personalizzazione a livello di documento.

Private Sub DocumentFrames()
    Dim textFrame As Word.Frame
    Me.Paragraphs(1).Range.InsertParagraphAfter()
    Me.Paragraphs(1).Range.Text = "Sample paragraph text."
    textFrame = Me.Frames.Add(Me.Paragraphs(1).Range)
    textFrame.Borders.OutsideLineStyle = Microsoft.Office.Interop. _
        Word.WdLineStyle.wdLineStyleDouble
End Sub 
private void DocumentFrames()
{
    Word.Frame textFrame;
    this.Paragraphs[1].Range.InsertParagraphAfter();
    this.Paragraphs[1].Range.Text = "Sample paragraph text.";
    textFrame = this.Frames.Add(this.Paragraphs[1].Range);
    textFrame.Borders.OutsideLineStyle = Microsoft.Office.Interop.Word
        .WdLineStyle.wdLineStyleDouble;
}

Autorizzazioni

Vedere anche

Riferimenti

Document Classe

Membri Document

Spazio dei nomi Microsoft.Office.Tools.Word