Is there a script or automation I could use to extract indented text from any given Pages doc?

I regularly need to compose an email containing all the quotations in a given Pages document. Those quotations are all indented by a single stop (ie indented 1").


Is there any way I can save myself the laborious weekly job of plodding through the doc, copy/pasting each bit of indented text into an email? I asked ChatGPT to write an automation, but it didn't work, so I'm coming here in the hope of some genuine (rather than artificial) intelligence!


Thanks in advance.

MacBook Air (M2, 2022)

Posted on Jun 6, 2023 8:10 AM

Reply
2 replies

Jun 6, 2023 10:02 AM in response to BGCooper

No there isn't, because the AppleScript scripting dictionary for Pages does not know about indented text, quotations, or how to isolate their content from the rest of the body text. It just knows about characters, words and paragraphs.


However, if you only put those quotations within Pages text boxes, however positioned, then AppleScript could get every text box and its content in the Pages document. It might be possible to get the text from each text box and append it as paragraphs to a newly composed email message. I haven't done this yet, and the devil may be in the details.


ChatGPT does not have access to the Pages scripting dictionary, so AI in this instance is unserved.

Is there a script or automation I could use to extract indented text from any given Pages doc?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.