Skip to main content
w_vanderzee
New Participant
November 1, 2022
Answered

Paragraph/Character styles ALWAYS sort by name?

  • November 1, 2022
  • 1 reply
  • 852 views

Hello everyone, 

 

When selecting the option Sort by name for paragraph/character styles InDesign doesn't seem to remember this. So when adding new styles, it is not added at the right position in the order. I have to select 'Order by name' manually everytime. Is there an option to have this order being remembered?

 

Thanks! 

This topic has been closed for replies.
Correct answer Mike Bro

Hello @w_vanderzee 

 

Per @Eugene Tyson's suggestion "to invoke the Sort By Name by script"

The below startup script will do just that...

Script location: Applications/Adobe InDesign 2022/Scripts/startup scripts

#targetengine "session"   
   
main();   
    
function main() {   
app.addEventListener("afterOpen", myEventFunction, false);   
}   
function myEventFunction(myEvent) {   
   if (myEvent.parent.constructor.name == 'LayoutWindow' ) {       
      app.menuActions.itemByID(8505).invoke(); //Paragraph styles sort by name
      app.menuActions.itemByID(8511).invoke(); //Character styles sort by name
  }  
} 

Regards,

Mike

1 reply

Community Expert
November 1, 2022

Sort By Name seems to be a one time function - and not a toggle to keep them ordered by name.

 

You can assign Keyboard Shortcut to it - go to Edit>Keyboard Shortcuts

 

 

Or use Quick Apply - invoke this panel by using CMD RETRUN (or CTRL RETURN)
it's also the little lightening bolt on the top right of the InDeisgn interface 

 

 

If you type in like this

 

 

It will be there the next time you call up the Quick apply.

 

 

It might be scriptable to invoke the Sort By Name to be on all the time - but I don't know @m1b  might know this... 

w_vanderzee
New Participant
November 1, 2022

Ok, thx!

 

Really strange thought this isn't a default option imo.

Mike BroCorrect answer
Brainiac
November 1, 2022

Hello @w_vanderzee 

 

Per @Eugene Tyson's suggestion "to invoke the Sort By Name by script"

The below startup script will do just that...

Script location: Applications/Adobe InDesign 2022/Scripts/startup scripts

#targetengine "session"   
   
main();   
    
function main() {   
app.addEventListener("afterOpen", myEventFunction, false);   
}   
function myEventFunction(myEvent) {   
   if (myEvent.parent.constructor.name == 'LayoutWindow' ) {       
      app.menuActions.itemByID(8505).invoke(); //Paragraph styles sort by name
      app.menuActions.itemByID(8511).invoke(); //Character styles sort by name
  }  
} 

Regards,

Mike