September 26, 2001 - Decoding Headers and Footers
![]() |
September 26, 2001 Decoding Headers and Footers Tips: September 2001
Yehuda Shiran, Ph.D.
|
textHead and textFoot properties of the HeaderFooter element include text instructions on how to prepare the HTML for the header and the footer. The resulting HTML can be found in the htmlHead and htmlFoot properties of the HeaderFooter element. The formatting strings can also be retrieved from the header and footer properties of the TemplatePrinter element.
The formatting strings are based on eleven different codes, which specify the information to be printed. The codes can be combined with text (for example, "Page &p of &P"). All codes begin with an ampersand. Here are the eleven codes:
&w. Insert the window title from thetitleproperty of theHeaderFooterelement.&u. Insert the page address from theURLproperty.&d. Insert the date in short format from thedateshortproperty.&D. Insert the date in long format from thedatelongproperty.&t. Insert the time in short format from thetimeshortproperty.&T. Insert the time in 24-hour format from thetimelongproperty.&p. Insert the page number from thepageproperty.&P. Insert the total number of pages from thepageTotalproperty.&b. Center the text following the&b.&b&b. Right-align the text following the&b&b.&&. A single amersand(&)



