Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.FilePageSetupFooter Method (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Sets up footers for printing.

Syntax

expression. FilePageSetupFooter( ** Name, ** Alignment, ** Text** )

expression A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
NameOptionalStringThe name of the view or report for which to set up footers for printing.
AlignmentOptionalLongThe alignment of the text in the footer. Can be one of the following PjAlignment constants: pjLeft, pjCenter, or pjRight. The default value is pjCenter.
TextOptionalStringThe text to display in the footer. The following special format codes may be included as part of the footer:
Format CodeDescription
&;BTurns bold printing on or off.
&;ITurns italic printing on or off.
&;UTurns underline printing on or off.
&;""fontname""Prints characters that follow the format code in the specified font. An example would be &;""Arial"".
&;nnPrints characters that follow the format code in the specified font size. Use a two-digit number to specify a size in points. An example would be &;08.
&;P""path""Inserts the specified image. An example would be &;P"" [My Documents] \Image.gif"". The term [My Documents] represents the full path to your My Documents folder.
&;[Date]Prints the current system date.
&;[Time]Prints the current system time.
&;[File]Prints the file name.
&;[Page]Prints the page number.
&;[Pages]Prints the total number of pages in the document.
&;[Project Title]Prints the title.
&;[Company]Prints the company name.
&;[Manager]Prints the manager name.
&;[Start Date]Prints the project start date.
&;[Finish Date]Prints the project finish date.
&;[Current Date]Prints the project current date.
&;[Status Date]Prints the project status date.
&;[View]Prints the view name.
&;[Report]Prints the report name.
&;[Filter]Prints the filter name.
&;[Saved Date]Prints the last saved date.
&;[Subject]Prints the subject.
&;[Author]Prints the author.
&;[Keyword]Prints the keyword(s).
&;[ Field_Name ]Prints the value of the field specified with Field_Name. If a macro will be run in more than one language, the field specified with Field_Name must use the name localized for each language. An example would be &;[Actual Cost].

Return Value

Boolean

Remarks

Using the FilePageSetupFooter method without specifying any arguments displays the Page Setup dialog box with the Footer tab selected.

Example

The following example sets up a footer for printing

Sub SetLegend() 

 Dim strLegend As String 

 strLegend = GetFontFormatCode("Arial") 
 strLegend = strLegend &; "&;BThis text will appear in the legend.&;B" 

 Application.FilePageSetupLegend Text:=strLegend, _ 
 Alignment:=pjCenter, LegendOn:=pjOnEveryPage 
End Sub 

Public Function GetFontFormatCode(strFontName As String) As String 

 GetFontFormatCode = "&;" &; Chr(34) &; strFontName &; Chr(34) 
End Function
© 2018 Microsoft