View Single Post
 
Old 04-26-2022, 05:16 PM
Astrid Astrid is offline Windows 10 Office 2019
Novice
 
Join Date: Apr 2022
Posts: 9
Astrid is on a distinguished road
Default

My mistake, it is not the formattedtext property, it is the deleting of the actual section break:

Code:
  While .Sections.Count > 1
    .Sections.First.Range.Characters.Last.Delete
  Wend
It is easy to reproduce:
1. Create a document with two sections
2. First section with different first page, in header first page add two bookmarks
3. Add second section, only primary headers/footers, both empty
4. Select last paragraph first section, and first second section
5. Run the code
6. Bookmarks in first section are gone

Is it possible to solve this?
Reply With Quote