Skip to main content
Participant
April 23, 2009
Answered

ChangeCase [JS]

  • April 23, 2009
  • 1 reply
  • 1602 views

I have this bit of code

finds = app.documents[0].findGrep();
for(i=0;i<finds.length;i++){
finds.contents=finds.contents.toLowerCase(); }

Which works fine for LowerCase and UpperCase

Can anyone tell me how to get TitleCase or Sentence Case to work please.....

This topic has been closed for replies.
Correct answer Peter Kahrel

Use the InDesign changecase options:

finds.changecase (ChangecaseMode.titlecase);

Peter

1 reply

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
April 23, 2009

Use the InDesign changecase options:

finds.changecase (ChangecaseMode.titlecase);

Peter

rwu2359Author
Participant
April 23, 2009

Fantastic - thank you

Participant
September 25, 2013

I am not that familiar with coding. What is this coding finding? All CAP?

Could anyone give me the full code to do this?

Is this an AppleScript or JavaScript?