If I update indexes for the TOC some page numbers are correct, however some are not, I had to re-run the update index on the TOC around 3 or 4 times until the page numbers in the TOC look correct (right click on the TOC and selecting “Update Index”). Is this expected behaviour? If yes, is there a way to determine how many times I’ll need to run it?
I was trying to fix our TOC from a generated document using a short python script using the uno UpdateAllIndexes.
dispatcher.executeDispatch(oDocFrame, “.uno:UpdateAllIndexes”, “”, 0, ())
Once a user indicated issues I tried myself in the writer and as mentioned had to run it an addtional 2 or 3 times.