How to Put a Page Border Around a Header in Microsoft Word
Question details
The user wants a box page border that surrounds the header in a Word document.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A DOCX document needs a page border that includes the header, either throughout the document or in a specific section.
- Observed behavior
- The border may not surround the header, or the relevant option may appear cleared, when the border is measured from the wrong reference point.
Open the DOCX file in Word and identify whether the border should apply to the entire document or only one section. If you need a section-specific border, click within that section before opening the border settings.
Measure the Word page border from the text area
Use the page border options to create a box around the header and apply it to the desired part of the document.
In Word, go to Design > Page Borders to open the Borders and Shading dialog box.
On the Page Border tab, select Box under Setting, then choose the line style, color, and width you want.
Click Options, set Measure from to Text, and select Surround header if that option is available. Click OK to return to the border dialog box.
Under Apply to, select Whole document or the appropriate section, then click OK.
Review the header and border in Print Layout. If spacing needs adjustment, go to Layout > Margins and choose a preset or Custom Margins.

Work with Word documents in WPS Writer
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Word documents. Its DOCX support makes it easy to move files between WPS Writer and Microsoft Office; check page borders and header layout after opening a document.

Frequently Asked Questions
Why doesn't my page border surround the header?
In Word, go to Design > Page Borders > Options and check Measure from. Select Text, then select Surround header if available.
Can I add the border to just one section?
Yes. Click in the section, open Design > Page Borders, and choose the appropriate section under Apply to before clicking OK.
How do I change the space around the border?
Open Design > Page Borders > Options to adjust the border distances. You can also use Layout > Margins > Custom Margins to change the document margins.
Can WPS Writer open the bordered Word document?
Yes. Open the DOCX file in WPS Writer, then review the header and page border layout because formatting may differ between applications.




