Inserting page number in header or footer from Gallery erases the all the information from header and Footer but if you don’t want to lose information already in a header or footer then use page FIELD CODE feature. The main benefit of field code is that you can customize the page number according to your need, you can insert as you like.

The following are the steps to insert X of Y page number from field code.
- Double-click in the header or footer area to activate.
- This double clicking will opens the Design automatically.
- Select the position where you’d like to add the page numbers (Left, right or center).
- In Urdu Composing, writer mostly uses center or left but in English composing Right and Center location is used.
- To place your page numbers in the center, click Insert Alignment Tab in the Design tab, click Center, to insert left, click the left and to insert on right side, click right check box. See below
- OK after selecting Position the next step is to insert Page number codes from text fieldWe will insert page number in following format
Page 1 of 30 pages
In above format, there are 5 sections (Page 1 Of 30 page)
- Page is the word that we will manually type
- 1 is the current page number that we will insert by code
- of is the word that we will type manually
- 30 is supposed total number of pages
- Pages is the word that we type manually.
- Type the word Page.
- Press space to insert space.
- Now go to Insert Tab.
- Click Quick Parts and click on Field

- Field code box will appear having all the codes. Show all codes by selecting All option from category field. See below
- From field name find Page
- Select format type and press OK. See below
- Now type the word "of " and the press space button to insert space.
- Now we will insert the code for total numbers of the page, go to Insert Tab.
- Click Quick Parts and click on Field
- Field code box will appear having all the codes. Show all codes by selecting All option from category field. See below
- From field name find NumPages
- Select format type and press OK. See below
- At the end type the word " Pages "
- Page number X of Y has been successfully inserted. click anywhere outside the header and footer area.

Watch all working in this video. Coming Soon