How to add page numbers to a Microsoft Office InfoPath 2003 form (827011)



The information in this article applies to:

  • Microsoft Office InfoPath 2003
  • Microsoft Office InfoPath 2003, Service Pack 1 (SP1)

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. 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.

back to the top

Design your form

  1. Start Microsoft Office InfoPath.
  2. On the File menu, click Design a Form.
  3. In the Design a Form task pane, click New Blank Form.
  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 the Footer Text box, type &bPage &p of &P.
  11. Click OK.
back to the top

Preview and print your form

  1. On the File menu, point to Preview Form, and then click Default.

    A preview of the form appears.
  2. While you are in Preview mode, click Print on the File menu.

    The footer text Page 1 of 1 is aligned on the right in the printed output.
back to the top

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.
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

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:kbPubTypeKC KB827011 kbAudDeveloper