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

How to apply paragraph then next style as a query or GREP?

Explorer ,
May 20, 2025 May 20, 2025

Hi. I'm testing using the Multi-Find/Change plug-in in my documents to apply about a dozen queries in one go. But there's one stage I've been doing manually which I can't figure out how to represent as a GREP or query, meaning I can't include it in the set of queries to apply.

Basically during the process I'd select the first line of text, and right-click on the appropriate paragraph style and select 'Apply "xxx" style then next syle'. How can this be represented as a query or GREP please? Or even apply first style then next, as I know the name of the style would need to be specified somewhere. Thanks!

TOPICS
Type
260
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

correct answers 1 Correct answer

Explorer , May 21, 2025 May 21, 2025

Thanks Barb - I'll take a look, although it does just appear to be a seperate stage just like opening the para styles and applying the first one?

The closest I can get using a find/change or GREP is to find the first style I know needs to change (which is a simple SKU of six numbers with a space in between ie ^9^9^9 ^9^9^9 or GREP $1 $2) and apply the correct style, but even though there is a next style assigned to that it won't apply it via search, only by doing it manually through the paragraph

...
Translate
LEGEND ,
May 20, 2025 May 20, 2025

I don't think it's possible through GREP. 

 

But it can be scripted - most likely a single invoke() should work. 

 

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 ,
May 20, 2025 May 20, 2025

Hi @defaults2aq0czkx4gl:

 

This may or may not be helpful but I handle this via a free script created by one of our fellow Adobe Community Experts, @TaW and available here: https://www.id-extras.com/indesign-quick-apply-with-next-style/.

 

Similarly to you, I start new documents by running a series of queries in a FindChangebyList script, and then I run this one. I'll be curious to see if we can both combine this into a single task. 

 

~Barb

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
Explorer ,
May 21, 2025 May 21, 2025
LATEST

Thanks Barb - I'll take a look, although it does just appear to be a seperate stage just like opening the para styles and applying the first one?

The closest I can get using a find/change or GREP is to find the first style I know needs to change (which is a simple SKU of six numbers with a space in between ie ^9^9^9 ^9^9^9 or GREP $1 $2) and apply the correct style, but even though there is a next style assigned to that it won't apply it via search, only by doing it manually through the paragraph style pane.

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 ,
May 20, 2025 May 20, 2025

You can define and apply it with an object style.

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