FooterLeft property
Contains the text string that appears in the left portion of a document's footer.
Version added
2002
Syntax
| |
| |
strRet |
String. The text in the left portion of the footer. |
object |
Required. An expression that returns a Document object. |
stringExpression |
Required String. New text for the left portion of the footer. |
Remarks
You can also set this value in the Left 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.
Following is a list of valid escape codes for document footers and headers.
Escape code |
Description |
&p |
Page number |
&t or &T |
Current time |
&d (short version) or &D (long version) |
Current date |
&& |
Ampersand |
&e |
File name extension |
&f |
File name |
&f&e |
File name and extension |
&n |
Page name |
&P |
Total printed pages |
Example
The following macro is used to place a string containing the current date into the left portion of a document's footer.
Sub SetFooterLeft()
Dim szFooter as String
'Build footer string
szFooter = "The Date is " & "&D"
'Set footer of current document
ThisDocument.FooterLeft = szFooter
End Sub
If the date was May 4, 2002, the left portion of the footer contains "The Date is Thursday, May 4, 2002" after running this macro.