Skip navigation
Currently Being Moderated

[JS] How to break link to paragraph style from script?

Apr 14, 2009 12:47 AM

I don't found the command break link to paragraph style from script.

I want "unapply" the style from the text, but leave the formatting intact.

 

Can help me?

 
Replies
  • Currently Being Moderated
    Apr 14, 2009 3:11 AM   in reply to LeonardoAgosti

    In the interface it's a separate command ("Break link to style"), but it seems in a script you have to use

     

    Paragraph.applyParagraphStyle (using:ParagraphStyle[, clearingOverrides:bool=true])

     

    You cannot use "null" or something similar for "ParagraphStyle", so I guess the idea is to use paragraph style #0 in your document (which is always "[No Paragraph Style]"). Be sure to set "clearing Overrides" to false, as it defaults to true.

    The following single line works on your current paragraph:

     

    app.activeDocument.selection[0].paragraphs[0].applyParagraphStyle (app.activeDocument.paragraphStyles[0], false);

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points