Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to add a header and page numbers to a form in Infopath 2003 or in InfoPath 2007


View products that this article applies to.

Summary

This step-by-step article describes how to add a header, and how to add a footer with page numbers to a view at design time in Microsoft Office InfoPath 2007 or in Microsoft Office InfoPath 2003. The text in the header and in the footer is visible on your printed output. However, the text in the header and in the footer is not visible while you fill out a form.

Design your form

  1. Start Microsoft Office InfoPath.
  2. In InfoPath 2007, click Design a Form Template on the File menu.

    In InfoPath 2003, click Design a Form on the File menu.
  3. In InfoPath 2007, click Blank in the Design a Form Template task pane, and then click OK.

    In InfoPath 2003, click New Blank Form in the Design a Form task pane.
  4. In the Design Tasks task pane, click Layout.
  5. In the Layout task pane, click Table with Title.
  6. Add any text to the title of your new form, and then add any text to the content of your new form.
  7. On the View menu, click Manage Views.
  8. In the Views task pane, click View1(Default), and then click View Properties.

    The View Properties dialog box appears.
  9. In the View Properties dialog box, click the Print Settings tab.
  10. In InfoPath 2007, click Header, type the text that you want in the Print form with this header box, and then click OK.

    In InfoPath 2003, type the text that you want in the Header text box.
  11. In InfoPath 2007, click Footer, type &bPage &p of &P in the Print form with this footer box, and then click OK.

    In InfoPath 2003, type &bPage &p of &P in the Footer text box.
  12. Click OK.

Preview and print your form

  1. In InfoPath 2007, point to Preview on the File menu, and then click Form. A preview of the form appears.

    In InfoPath 2003, oint to Preview Form on the File menu, and then click Default. A preview of the form appears.
  2. While you are in Preview mode, click Print on the File menu.

    The header text is aligned at the top left in the printed output. The footer text Page 1 of 1 is aligned on the right in the printed output.

Additional format codes for printing

InfoPath uses the same printing mechanism (MSHTML) as Microsoft Internet Explorer. You can use the same codes for printing with InfoPath that you might typically use with Internet Explorer. The following table lists the codes that are available for printing.
Collapse this tableExpand this table
To print this:Type this:
Page Address (URL)&u
Date in the short format that the Regional Settings in Control Panel specifies&d
Date in the long format that the Regional Settings in Control Panel specifies&D
Time in the format that the Regional Settings in Control Panel specifies&t
Time in the 24-hour format&T
Current Page Number&p
Total Number of Pages&P
Text aligned on the right (following &b)&b
Text that is centered (between &b and &b)&b&b
A single ampersand (&)&&

↑ Back to the top


Keywords: KB827011

↑ Back to the top

Article Info
Article ID : 827011
Revision : 3
Created on : 4/12/2007
Published on : 4/12/2007
Exists online : False
Views : 347