Proprietà DocumentBase.Frames
Ottiene una raccolta di Frames che rappresenta tutti i frame del documento.
Spazio dei nomi: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Sintassi
'Dichiarazione
Public ReadOnly Property Frames As Frames
public Frames Frames { get; }
Valore proprietà
Tipo: Microsoft.Office.Interop.Word.Frames
Raccolta 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. Per utilizzare questo esempio, eseguirlo dalla classe ThisDocument in un progetto 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;
}
Sicurezza di .NET Framework
- Attendibilità totale per il chiamante immediato. Impossibile utilizzare questo membro in codice parzialmente attendibile. Per ulteriori informazioni, vedere Utilizzo di librerie da codice parzialmente attendibile.