Footer Property

Microsoft Publisher Visual Basic

Footer Property

Returns a HeaderFooter object representing the footer of the specified Page object. Read only.

expression.Footer

expression    Required. An expression that returns a Page object from the MasterPages collection.

Remarks

This property is for master pages only. A "This feature is only for master pages" error is returned if the Footer property is accessed from a Page object that is returned form the Pages collection. A new HeaderFooter object is created for the specified master page by accessing this property.

Example

The following example creates a HeaderFooter object and sets it to the footer of the first master page.

      Dim objFooter As HeaderFooter
Set objFooter = ActiveDocument.MasterPages(1).Footer
				
    

The HeaderFooter object returned by the Footer property can be used to manipulate the footer content. The following example sets some properties of the HeaderFooter object of the first master page,

    With ActiveDocument.masterPages(1)
    With .Header
        .TextRange.Text = "Windows" & Chr(13) & "Office" & Chr(13) & "Internet Explorer"
        With .TextRange.ParagraphFormat
            .SetListType Value:=pbListTypeBullet, BulletText:="*"
            .Alignment = pbParagraphAlignmentLeft
        End With
    End With
    With .Footer
        .TextRange.Hyperlinks.Add Text:=.TextRange, _
            Address:="http://www.tailspintoys.com", _
            TextToDisplay:="Tailspin"
    End With
End With