If you want to create a header for the whole document and your header automatically change and match itself with the contents of that page you can follow these steps;
How To Create Dynamic Header In Word
Here we want to create to a header for our document, which showes the name of chapter in the header of our document and also in the other part shows the page number too.
1- Go to your text and select the header in your document and in the style part specify “Heading 1” for them.
2- Continue these steps to specify heading for all chapters in your document.
3- Click on the Insert tab.
4- In the Header and Footer part click on the Header or Footer command.
5- Choose Blank.
6- Click on the Design tab.
7- Select the Quick Parts.
8- Select the Field.
9- In the Field names part, select the “StyleRef”.
10- In the Style name part, select the Header.
11- Click Ok.
You can see the name of the chapters on your Header of your pages.
How to Add Page Number on Your Heading.
For inserting page number on your heading you should follow these steps;
1- Click on the Design tab.
2- Click on the “Insert Alignment Tab”.
3- In the Alignment part choose Right and click on Ok.
4- Click on Page Number.
5- Choose Current Position and choose your desired style for it.
Now you can see the page number and the names of the chapter on the header of your page.
How to Place Headers Between Lines in Word
For placing the header between lines you can follow these steps;
1- Click on the Home tab.
2- In the Paragraph part click on the Border and choose Top border.
3- Again click on the border and select Bottom border.
4- Click on Design tab.
5- Select the “Close Header and Footer” key.
Now you have dynamic header for your document.