TOCInFrameset Method

Microsoft Word Visual Basic

TOCInFrameset Method

       

Creates a table of contents based on the specified document and puts it in a new frame on the left side of the frames page.

expression.TOCInFrameset

expression   Required. An expression that returns a Pane object.

Remarks

For more information on creating frames pages, see Creating frames pages.

Example

This example opens a file named "Proposal.doc", creates a frames page based on the file, and adds a frame (on the left side of the page) containing a table of contents for the file.

Documents.Open "C:\Documents\Proposal.doc"
ActiveDocument.ActiveWindow.ActivePane.NewFrameset
ActiveDocument.ActiveWindow.ActivePane.TOCInFrameset