Pages: find indented paragraphs and change "before paragraph" spacing

I need to find all indented paragraphs in a 675-page Pages document and set the “before paragraph” spacing to 0 points. Can this be done in a script? I would not be able to do it myself in any case. If it can be done, would anyone care to try? Several of you were very helpful when I had a different challenge in this document in August.

I don’t see any way to achieve what you want in Pages via automation using AppleScript. The Pages v14.4 Scripting Dictionary is weak and excludes any reference to before/after paragraph, or indent settings. It does not use a special indent symbol before each paragraph when show invisibles is enabled.

You can select all of the content in that Pages document, and then on the Text panel, select the Layout tab. Under the indent section, if the First entry is blank, you can click once on the down increment button to make it 0 in and that immediately removes paragraph indenting document-wide.

Tested: Pages v14.4 on macOS Tahoe 26.2

If you were to export this Pages document to MS Word docx, and open it in Word, you could select all, visit Format menu > Paragraph… and in the Indentation section, set Special to (none). When you click OK, all paragraph indents vanish resulting left aligned document content.

Tested: Word v16.104, macOS Tahoe 26.2

Or… if you don’t have access to MS Word

Opening that same .docx in the free LibreOffice Writer, you can again select the entire content (cmd+A) and then from the Format menu > Paragraph… panel, select Indent & Spacing tab. In the Indent section, the First line selector will have no entry. Using the increment button, change that to 0.00" and the click OK. All of the selected paragraph indents will vanish.

Tested: LibreOffice v25.8.4.2 on macOS Tahoe 26.2

Many thanks for looking into this issue and responding quickly, VikingOSX.

I don’t want to remove indents. I need to set the paragraph spacing between every paragraph with an indent and the previous paragraph.

Doing any text manipulation in other word processors is not an option because my document has 675 pages of very carefully composed text using styles, overrides of styles, images, footnotes, table of contents, text boxes, et cet. Not everything is going to survive exporting and re-importing.

But if there is no way for a script to find indents, it doesn’t matter.

Thanks for helping.

I’m not at my Mac right now to try this, but is there a series of actions that could be scripted with a macro utility like Keyboard Maestro?
In other words, some sequence of actions to repeat for each paragraph?
Option-down-arrow should move you to the end of a paragraph. Then, a right-arrow or two should move to the beginning of the next paragraph. You could then possibly evaluate whether indent is specific in the inspector/palette. Keyboard Maestro can even let you do some screen analysis, where it essentially takes a screenshot of a specific area and matches that against an image you’ve specified.
If you can come up with a repeatable sequence, you might be able to automate it.