How to set the page number border in the footer of a book?

1, the first step is to open the word file, click the page number under the insert option, and select a format at the bottom of the page;

2. Immediately under the Insert option, click "Shape" and select the "Rectangular" style;

Then you can draw a rectangle at the page number. Then, in the format options of the drawing tool, click "Text Wrap" and select "Underlining Text". You can also adjust the style of the rectangular box here.

4. The final setting has the following effect (enlarge the page number).