Skip to main content
tully1254
Known Participant
February 13, 2024
Question

Change case of letters to Title Case within a Paragraph Style

  • February 13, 2024
  • 3 replies
  • 1215 views

I have typeset a book that has many titles. The titles are all in SENTENCE CASE ie first letter of title in in caps, the rest are all lowercase. I have set a style for the titles. Individually it is possible to change each title to TITLE CASE by rightclicking and changing the case to TITLE CASE.

Is it possible to change this through the paragraph style so that I dod not have to manually go through each title and change it?

This topic has been closed for replies.

3 replies

Anantha Prabu G
Legend
February 13, 2024

Hi @tully1254 
I hope this helps.

var myDoc = app.activeDocument;

app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

app.findTextPreferences.appliedParagraphStyle = "Subhd";// Please change your style name 
  
var myFinds = myDoc.findText();

for (var i = 0; i < myFinds.length; i++) {

   myFinds[i].texts[0].changecase(ChangeCaseOptions.UPPERCASE);

  }	

app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
Design smarter, faster, and bolder with InDesign scripting.
Mike Witherell
Community Expert
Community Expert
February 13, 2024

There are many scripts that can do this. For example:

https://www.marspremedia.com/software/indesign/change-letter-case

Mike Witherell
RvdT
Inspiring
February 13, 2024

Unfortunately not.

It is a feature request since 2017 (at least).

See Adobe InDesign UserVoice