Skip navigation
Currently Being Moderated

[js, id5] clearOverrides cells

Aug 6, 2012 5:57 AM

Hello,

 

I want to clear all overrides including text within tables. I thought I had the right script:

 

 

var myDoc = app.activeDocument;
myDoc.stories.everyItem().tables.everyItem().cells.everyItem().clearOverrides();

 

But this gives me the following error:

 

Error 24:

Error string: myDoc.stories.everyItem().tables.everyItem().cells.everyItem().clearO verrides()

is not a function

 

What is wrong with the script?

 

Regards, Sjoerd

 
Replies
  • Currently Being Moderated
    Aug 6, 2012 6:14 AM   in reply to stoereee

    stoereee wrote:

     

    ..  this gives me the following error:

     

    Error 24:

    Error string: myDoc.stories.everyItem().tables.everyItem().cells.everyItem().clearO verrides()

    is not a function

    What is wrong with the script?

     

    'clearOverrides' is not a function of Cells.

     

    Try clearCellStyleOverrides.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 6, 2012 7:03 AM   in reply to stoereee

    You can use the method "clearOverrides()" on "texts" objects like "characters", "words", "paragraphs" etc. and of course the whole "texts" object of a cell:

     

    myDoc.stories.everyItem().tables.everyItem().cells.everyItem().texts[0].clearOverrides();
    

     

    By that you will not clear overrides of "texts" in cells of tables that are nested inside tables…
    Or tables that are nested into footnotes*…

     

    (*I never noticed that or forgot about it, but it seems that the story editor cannot see into tables nested into footnotes!)

     

    Uwe

     
    |
    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