ITP recognizes headers and footers defined in a page style. The ITP instructions in these headers and footers are executed at the location the page style begins.
In OpenOffice.org headers and footers are defined in page styles. In these page styles you can enable headers and footers and you can define if different headers and footers have to be defined for the odd and even pages (Same content left/right).

Every page in an OpenOffice.org document has a page style applied to it. To see which page style is applied to the page or to change the page style you use the Styles Catalog.
Page styles can also be applied to a page in combination with a page break. This combination offers a strong mechanism with ITP to control the documents layout.
In OpenOffice.org a page break is a property of a paragraph. This means whenever you produce a page end you will also produce a paragraph ending. OpenOffice.org gives you the choice to produce this paragraph ending just before the page break or right after this page break but in either case you will get this paragraph ending.
When the first paragraph of a document is set in a style that has a page break before, this page break will be suppressed but the page style connected with this paragraph will be applied to the page. This OpenOffice.org feature can be used in combination with ITP to enable the evaluation of ITP expressions in the headers or footers on the first page of a document.
Refer to the sample document Example Header.sxw in the Examples folder of the support section of the Aia website for a documented example how to use ITP instructions in headers and footers of a model document.
Creating different headers and footers for the first page and subsequent pages can simply be done by creating two page styles, one with the headers and footers for the first page and one with the headers and footers for the subsequent pages.