Skip to main content
Scott Falkner
Community Expert
March 20, 2019
Question

Script to apply character styles in GREP styles, then remove GREP

  • March 20, 2019
  • 1 reply
  • 1293 views

I have a long document with some fairly complicated GREP styles. They slow the program to a crawl and complicate it for the client I will eventually send the file to.

What I would like to do is run a script that will convert the GREP styles to normally applied character styles, then delete the GREP from the paragraph style. The document would look the same, but the GREP would be gone. I don't think I need to worry about character style conflicts.

Is there a script that can do that or a way to script it? I'm no scripter, so the only other option is multiple Find/Change steps.

This topic has been closed for replies.

1 reply

Abambo
Community Expert
March 20, 2019

You could run in trouble with that as grep may add multiple character styles to the same characters, something that is not possible with standard assignments.

ABAMBO | Hard- and Software Engineer | Photographer
Abambo
Community Expert
March 20, 2019

Adding to this: a script could well add the accumulated formatting as manual additions, but that would be bad design. I hate manual formatting when working in other ones documents.

ABAMBO | Hard- and Software Engineer | Photographer