Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Remove hyphenate throughout the file

Participant ,
Sep 01, 2017 Sep 01, 2017

my file is of around 50 pages and it contains lots of text boxes with hyphenate option ON, is there way or script to remove hyphenate throughout the file at once...

thanks in advance

28.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Sep 01, 2017 Sep 01, 2017

This jsx script turns off hyphenation in an active document, also modifies Paragraph styles accordingly. The code isn't mine, sorry, couldn't detect original author now...

Application.prototype.main=function()

{

if(this.documents.length>0)

{

var doc= this.activeDocument;

doc.stories.everyItem().hyphenation=false;

var paraSt = doc.paragraphStyles.everyItem().getElements();

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

{

if(paraSt.name.indexOf("[")==-1)

{

paraSt.hyphenation=false;

}

}

}

}

app.main();

alert("Hyphens removed!"

...
Translate
Community Expert ,
Sep 01, 2017 Sep 01, 2017

Did you not use paragraph styles?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 01, 2017 Sep 01, 2017

This jsx script turns off hyphenation in an active document, also modifies Paragraph styles accordingly. The code isn't mine, sorry, couldn't detect original author now...

Application.prototype.main=function()

{

if(this.documents.length>0)

{

var doc= this.activeDocument;

doc.stories.everyItem().hyphenation=false;

var paraSt = doc.paragraphStyles.everyItem().getElements();

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

{

if(paraSt.name.indexOf("[")==-1)

{

paraSt.hyphenation=false;

}

}

}

}

app.main();

alert("Hyphens removed!");

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 01, 2017 Sep 01, 2017

Script written in March 2011 by Loic.Aigon, surely the best scripter from Toulouse, in France, I know! …

[Hi Loïc!] 

(^/)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 01, 2017 Sep 01, 2017

Thank You, Obi-wan, I'll write it down!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 01, 2017 Sep 01, 2017

Light version:

app.activeDocument.stories.everyItem().texts[0].hyphenation = false; 

var PStyle = app.activeDocument.allParagraphStyles; 

for ( p = 1; p < PStyle.length; p++) PStyle

.hyphenation = false;

alert("Hyphens removed!");

(^/)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 05, 2017 Sep 05, 2017
LATEST

thanks, hope this might work for illustrator files also...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 01, 2017 Sep 01, 2017

Hi,

Open paragraph panel from Type menu.. you will see the hyphenate option at the bottom of the panel. Turn it off. This Will override the style definations for the paragraphs.

If you have defined different paragraph styles in your document then you will need to edit each style(double click on the style name to open the dialog box) and turn off the hypenation.

-Aman

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 01, 2017 Sep 01, 2017

Yeah, that's exactly what the script does... in one click and even less seconds

Worth to bother installing if you have more than 1-2-3 para styles...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines