This documentation is archived and is not being maintained.

Document.MasterPages Property

Office 2007
Returns the MasterPages collection for the specified publication.

Syntax

expression.MasterPages

expression   A variable that represents a Document object.

Return Value
MasterPages

Example

The following example sets the text in the first text frame on the master page to Second Quarter.

Visual Basic for Applications
Dim mp As MasterPages

Set mp = ActiveDocument.MasterPages

With mp.Item(1)
    .Shapes(1).TextFrame.TextRange.Text = "Second Quarter"
End With



Show: