>That part I already did. Each chapter of the same level has the same header. Now I have to access the headers by code...
The following actions will select all text from one heading, up to the next:
Extend select (F8)
Go to next heading: at the bottom of the vertical scrollbars, there are "up" and "down" buttons; between them, there is a small round dot.
This will generate the following macro in Word: Selection.Extend
Application.Browser.Target = wdBrowseHeading
Application.Browser.Next
I hope you can continue from there, perhaps by accessing the "Selection" object.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)