I'm not sure what you mean. This script should work on the entire document. What are you trying to do differently?
BTW, the script has a bug. It should be myDoc.changeObject() and myDoc.changeText() instead of working on the app level.
It work on pages but Master page.
Set app.findChangeObjectOptions.includeMasterPages = true and app.findChangeTextOptions.includeMasterPages = true
Thank you Harbs
Thank you so much.