Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Complicated Find A\& Replace - replace style in the following paragraph

Participant ,
Oct 17, 2018 Oct 17, 2018

Hey there good people,

Is it possible to find style A, and replace the style of the following paragraph which is in style B, to style C.

Does it make sense to anyone?

for example:

this text is in paragraph A this text is in paragraph A this text is in paragraph A this text is in paragraph A.

this text is in paragraph B this text is in paragraph B this text is in paragraph B this text is in paragraph B. <-this paragraph I wish to change to style C.

this text is in paragraph B this text is in paragraph B this text is in paragraph B this text is in paragraph B.

I found a similar question but the answer was in a script, and I have no idea where in InDesign I can change the code

.

help!

337
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2018 Oct 17, 2018

Hi Vraja,

indeed, this is something a script can do. And only a script.

Michel's solution, the script code, will only work if all involved paragraph styles are stored in the root of the Paragraph Styles panel.

It can be expanded easily ( for Michel or other scripters ) to fit your needs. To make it perfect one has to prepare some cases as well, like stories that have only one paragraph or no paragraph at all.

Regards,
Uwe

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 17, 2018 Oct 17, 2018

Hey Uwe,

Thanks for the reply, all paragraphs in my document have a paragraph style if that's what you mean by "stored in the root..."

the document is mostly one story,

What's the next stage? where does the code fit in?

I also develop html and css and php so I have little ideas about scripts...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2018 Oct 17, 2018
LATEST

Stored in the root of the Paragraph Styles panel means, that the styles are not nested in Paragraph Style Groups.

Go ahead and ask Michel on the other thread you linked to to expand the script to your needs.

Currently I'm not on my machine with InDesign installed so I cannot test anything.

It would be perfect if you can supply a test file.

Regards,
Uwe

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines