Class Frameset (Word VBA)

The class Frameset represents an entire frames page or a single frame on a frames page.

The main procedures of class Frameset are AddNewFrame and Delete

Set

To use a Frameset class variable it first needs to be instantiated, for example

Dim frm as Frameset
Set frm = ActiveDocument.Frameset

The following procedures can be used to set variables of type Frameset: Document.Frameset, AddNewFrame, ChildFramesetItem, ParentFrameset and Pane.Frameset

Methods

These are the main methods of the Frameset class

AddNewFrame - Adds a new frame to a frames page.

Dim frmAddNewFrame As Frameset
Set frmAddNewFrame = ActiveDocument.Frameset.AddNewFrame(Where:=wdFramesetNewFrameAbove)

Delete - Deletes the specified Frameset object.

ActiveDocument.Frameset.Delete

Properties

ChildFramesetCount returns the number of child Frameset objects associated with the specified Frameset object.

Dim lngChildFramesetCount As Long
lngChildFramesetCount = ActiveDocument.Frameset.ChildFramesetCount

ChildFramesetItem returns the Frameset object that represents the child Frameset object specified by the Index argument.

Dim lngIndex As Long: lngIndex =  
Dim frmChildFramesetItem As Frameset
Set frmChildFramesetItem = ActiveDocument.Frameset.ChildFramesetItem(Index:=lngIndex)

FrameDefaultURL returns or sets the webpage or other document to be displayed in the specified frame when the frames page is opened.

ActiveDocument.Frameset.FrameDefaultURL =

FrameDisplayBorders true if the frame borders on the specified frames page are displayed.

ActiveDocument.Frameset.FrameDisplayBorders = True

FrameLinkToFile true if the webpage or other document specified by the FrameDefaultURL property is an external file to which Microsoft Word maintains only a link from the specified frame.

ActiveDocument.Frameset.FrameLinkToFile = True

FrameName returns or sets the name of the specified frame on a frames page.

ActiveDocument.Frameset.FrameName =

FrameResizable true if the user can resize the specified frame when the frames page is viewed in a web browser.

ActiveDocument.Frameset.FrameResizable = True

FrameScrollbarType returns or sets when scroll bars are available for the specified frame when viewing its frames page in a web browser.

ActiveDocument.Frameset.FrameScrollbarType = wdScrollbarTypeAuto

FramesetBorderColor returns or sets the color of the frame borders on the specified frames page.

ActiveDocument.Frameset.FramesetBorderColor = RGB(0,0,255)'blue

FramesetBorderWidth returns or sets the width (in points) of the borders surrounding the frames on the specified frames page.

ActiveDocument.Frameset.FramesetBorderWidth =

Height returns or sets a Float that represents the height (in points) of the specified Frameset object.

ActiveDocument.Frameset.Height =

HeightType returns or sets the width type for the specified frame on a frames page.

ActiveDocument.Frameset.HeightType = wdFramesetSizeTypeFixed

Parent returns an object that represents the parent object of the specified Frameset object.

Dim objParent As Object
Set objParent = ActiveDocument.Frameset.Parent

ParentFrameset returns a Frameset object that represents the parent of the specified Frameset object on a frames page.

Dim frmParentFrameset As Frameset
Set frmParentFrameset = ActiveDocument.Frameset.ParentFrameset

Type returns the Frameset object type.

Dim wftType As WdFramesetType
wftType = ActiveDocument.Frameset.Type

Width returns or sets the width (in points) of the specified Frameset object.

ActiveDocument.Frameset.Width =

WidthType returns or sets the width type for the specified Frameset object.

ActiveDocument.Frameset.WidthType = wdFramesetSizeTypeFixed