Skip to main content
Sandee Cohen
Legend
January 18, 2017
Answered

GREP to convert first letter of all paragraphs from lowercase to uppercase?

  • January 18, 2017
  • 3 replies
  • 4475 views

Please don't ask how I inherited this text, but I have a book where every paragraph starts with a lowercase letter.

I was able to convert all of the lowercase letters to uppercase by running ^a to A, then ^b to B, ^c to C, etc. It only took 26 times.

But would there have been a more succinct way to do it in one fell swoop?

This topic has been closed for replies.

3 replies

Community Expert
January 10, 2020

Hi together,

I hope Foltman is looking into this thread again.

His script code was damaged by moving this thread to the new forum.

 

Example: The iterator i is missing inside the for-loop:

for(i=0; i < myDoc.allParagraphStyles.length; i++){
	myParagraphStyles.push(myDoc.allParagraphStyles.name);
};

 

The corrected code for this part is this:

for(i=0; i < myDoc.allParagraphStyles.length; i++){
	myParagraphStyles.push(myDoc.allParagraphStyles[i].name);
};

 

Other corrections should be made as well. Only Foltman could edit this old post from 2017, I think.

 

Regards,
Uwe Laubender

( ACP )

Participant
January 10, 2020

Can you send the link of Change Case

Obi-wan Kenobi
Obi-wan KenobiCorrect answer
Legend
January 18, 2017
Sandee Cohen
Legend
January 18, 2017

You sir, are a genius!!!

Obi-wan Kenobi
Legend
January 18, 2017

… Simply a Jedi! 

(^/)