What you want in fact is not to change page style but to change header contents. Although this is obviously linked because a page style can have only one header, you can achieve your goal with “dynamic” headers.
What you need is a field in the header capturing information from the first paragraph of the page.
This is usually done styling some paragraphs with Heading n styles, structuring the document as chapters, sub-chapters, etc. Since your document is akin to a dictionary, it is not supposed to be broken into chapters. Provided you customise the Heading n styles, you can use them to mark the occurrence of a term with Heading 1, some “technical” information with Heading 2 and let the definition be in regular Text Body.
With such an organisation, you can then Insert
>Field
>More Fields
, Document
tab, Chapter type, Chapter name format, level 1.
When a new page is allocated, this causes the “context” of the first paragraph to be examined. The current Heading 1 is retrieved and its properties are used to generate the header.
This means the first page may not be “titled” if the first paragraph is not a Heading 1. Subsequent pages will all have a “title” if some Heading 1 occurred before switching to a new page. If the first paragraph in a page is a Heading 1, its content will be used in the header instead of the one current at end of the previous page.
You’ll need to experiment a bit to decide what exactly should be put in Heading 1 paragraphs. Of course, Heading 1 must not force a page break in its Text Flow
tab.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
EDIT 2019-12-05 after analysis of your document
What you see is a logical consequence of your “misuse” of empty paragraphs to achieve vertical spacing. You have the following sequence with every paragraph styled Word Heading:
(empty paragraph)
AFTER ALL WE CAN DO
(empty paragraph)
Therefore when you leave this block, the latest known Word Heading paragraph is the last empty paragraph. It will be used after next page break, resulting in an empty content of the header.
The fix is quite easy: set all your needed vertical spacing inside the definition for style Word Heading, Indents & Spacing
tab, spacing above and below paragraph. After that, remove the empty paragraphs.
Note 1: as a general rule, always customise the paragraph style definition to include the spacing above and below. Using empty paragraphs for that will play bad tricks on your back, as demonstrated here. Also, with a paragraph style, you can change the spacing for a single location and it will apply immediately on all occurrences of said paragraph style.
Note 2: you spaced one of your paragraphs with a line break (Shift
+Return
) which is not the same as a paragraph mark (Return
). This resulted in a space added before the title in the TOC.