Ah, you're using CS3. I'll delete the other topic.
Which scripting language have you tried? Are you trying to set the same cell style to all cells in the table or some mixture?
I am trying to set the same cell style to all cells in the table.
myTable.cells.itemByRange(0,-1).appliedCellStyle = myStyle;1 person found this helpful
which, I believe, is quicker than:
myTable.cells.everyItem().appliedCellStyle = myStyle;
and before you apply CellStyle - first you need to call clear local formatting
Sub ClearCellStyleOverrides([ClearingOverridesThroughRootCellStyle As Boolean = False])
Member of InDesign.Cell
Clear Cell Style Overrides / ClearingOverridesThroughRootCellStyle: If true, clears all overrides, whether or not they are defined in the underlying cell style
because if do not do this - your new CellStyle will not work - this happens in VB on PC - maybe JS is better ...
so in JS this probably will be:
Thanks to Both.
Robin, I'd like to clear cell and table style overrides using AppleScript -- can you advise? Not sure how to parse the JS code you wrote above. I wonder if you could just tell me which is the key command to clear the local overrides?
The AppleScript command is 'clear cell style overrides'.<br /><br />-- <br />Shane Stanley <firstname.lastname@example.org><br />AppleScript Pro Sessions <a href=http://scriptingmatters.com/aspro>
Thank you, Shane! Works like a charm. As does 'clear table style overrides' when targeting a table.
how can i create and apply cell/table style?
i am working in VC.NET.
Hi, I'm trying to incorporate that clear cell style overrides in my script but can't find how to or where to put it? Please advise.
these two lines work in CS5
set applied table style of selection to "Tableau BASE" -- nom du style du tableau
set applied cell style of cells of selection to myCellStyle
but where do I put the "clear cell style overrides"?
I know the original post was for CS3, but the command is still in the dictionary in CS5 so it must still work, I just haven't figured out how.