FooterCenter property

Microsoft Visio Developer Reference

FooterCenter property

   Example   

Contains the text string that appears in the center portion of a document's footer.

Version added

2002

Syntax

strRet = object.FooterCenter
object.FooterCenter = stringExpression

strRet

String. The text in the center portion of the footer.

object

Required. An expression that returns a Document object.

stringExpression

Required String. New text for the center portion of the footer.

Remarks

You can also set this value in the Center box under Footer in the Header and Footer dialog box (on the View menu, click Header and Footer).

Both strRet and strExpression can contain escape codes that represent data. These escape codes can be concatenated with other text. For a list of valid escape codes you can use with the FooterCenter property, see the FooterLeft property.

Example

The following macro is used to place a string containing the current page number and total number of pages into the center portion of a document's footer.

Sub SetFooterCenter()
    Dim szFooter as String
    'Build footer string
    szFooter = "Page &p of &P"
    'Set footer of current document
    ThisDocument.FooterCenter = szFooter
End Sub

If this is a one-page document, the center portion of the footer contains "Page 1 of 1" after running this macro.