FooterCenter Property
TOC
Collapse the table of content
Expand the table of content

Document.FooterCenter Property (Visio)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Gets or sets the text string that appears in the center portion of a document's footer. Read/write.

expression .FooterCenter

expression A variable that represents a Document object.

Return Value

String

You can also set this value in the Center box under Footer in the Header and Footer dialog box (click the File tab, click Print, click Print Preview, and then in the Preview group, click Header & Footer).

Both the string returned by the property and the string you pass to the property 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 topic.

The following macro shows how to place a string containing the current page number and total number of pages into the center portion of a document's footer. After you run this macro on a one-page document, the center portion of the footer contains "Page 1 of 1".

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

Show:
© 2016 Microsoft