Thanks so much for all this effort. I tried running it but it threw
"Error: RTF file missing inside the exported RTFD package.”
You’ve also inspired me to get back to basics. I used to write command-line obj-c programs that used all those NS libraries. Those were golden days.
And I remember seeing another AppleScript script years ago that removed images from RTFDs. It made extensive use of NS frameworks and attribute runs, and …
Oh, it was in this forum! I just located it. Here’s the link: If DevonThink could find images inside RTF files … - #3 by pete31.
Since this latter script manages to copy-through all the rich properties, we know that rich-text reproduction is possible. All I need to do is figure out how to combine cutting at a delimiter with rich-text preservation.
Thanks again.