| Standard HTML |
Word Custom HTML |
Description |
| <html> |
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"> |
Specifies the word and
office name spaces. I used this to allow me to setup the documents in
print preview mode by default. |
|
<style>
@page Section1 {mso-footer:f1;}
div.Section1{page:Section1;}
p.MsoFooter, li.MsoFooter, div.MsoFooter{
mso-pagination:widow-orphan;
tab-stops:center 216.0pt right 432.0pt;}
</style> |
You need these style
elements defined on the page.
The @page links to the div element. |
| <body> |
<body>
<div class="Section1"> |
Tells Word to wrap the
contents of the body in Section1 (see the css definition above). |
|
<div style="mso-element:footer"
id="f1">
<p class="MsoFooter"><span style='mso-field-code:"
FILENAME "'> </span>
<span style='mso-tab-count:2'></span>Page <span style='mso-field-code:"
PAGE "'></span> of <span style='mso-field-code:"
NUMPAGES "'></span></p>
</div> |
This is the actual
footer, I have a 3 section footer with the file name and page num/count
formatted. This will appear in the main file ( I put it as the last html
before the close of the main outer div. |
| </body> |
</div>
</body> |
This matches the
opening div at the start of the body tag to setup the whole html
document in the Section1 which is linked to the footer ID via the CSS. |