Skip to main content
wckdtall
Inspiring
September 20, 2023
Question

Find and replace text Change Grep Turn off hyphenation

  • September 20, 2023
  • 0 replies
  • 156 views

Wanted to add this to the forums, I was looking for a solution to turn off hyphenation for a textbox but it is unavailable to ChangeGrepPreferences from what I can find. Running a simple Grep Find will work where [0] could be looped through each find. Including but commented out lines of change just for additional context.

app.findGrepPreferences.findWhat = "FIND_TEXT";
app.activeDocument.findGrep()[0].parentStory.hyphenation = false;
//app.changeGrepPreferences.changeTo = "REPLACEMENT_TEXT";
//app.activeDocument.changeGrep();


As an example of normal attribute syntax, below is justification.

app.changeGrepPreferences.justification = Justification.LEFT_ALIGN;
This topic has been closed for replies.