Document.Frames Property (2007 System)
Gets a Frames collection that represents all the frames in the document.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Frames As Frames
'Usage
Dim instance As Document
Dim value As Frames
value = instance.Frames
[BrowsableAttribute(false)]
public Frames Frames { get; }
[BrowsableAttribute(false)]
public:
property Frames^ Frames {
Frames^ get ();
}
public function get Frames () : Frames
Property Value
Type: Frames
A Frames collection that represents all the frames in the document.
Examples
The following code example adds text to the first paragraph and then adds a text frame to the text. The code then changes the border of the text frame to wdLineStyleDouble.
This example is for a document-level customization.
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;
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.