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

How to apply paragraph style and clear character styles

Community Beginner ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

Hi for every one,

I've a paragraph called myParagraph . I would like to apply the paragraph style which called N with the option which is similar to

Apply "N" , Clear Character Styles

the code i used is

myDoc = app.activeDocument;

myParagraph=myDoc.spreads[2].pages[0].textFrames[0].paragraphs[1];

myParagraphStyle=myDoc.paragraphStyles.itemByName("N");

myParagraph.applyParagraphStyle(myParagraphStyle,true);

the reslut it applyed the paragraph style N but

the font size of the original paragraph remain . does not change to the new one

Where is it going wrong?

Please suggest

Thank you

TOPICS
Scripting

Views

736

Translate

Translate

Report

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

People's Champ , Jul 25, 2017 Jul 25, 2017

myParagraph.appliedCharacterStyle = myDoc.characterStyles[0];

myParagraph.applyParagraphStyle(myParagraphStyle,true); 

Votes

Translate

Translate
People's Champ ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

myParagraph.appliedCharacterStyle = myDoc.characterStyles[0];

myParagraph.applyParagraphStyle(myParagraphStyle,true); 

Votes

Translate

Translate

Report

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
Community Beginner ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

LATEST

it works,

thank you

Votes

Translate

Translate

Report

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