Thread View: adobe.scripting.indesign
7 messages
7 total messages
Started by K.Hemachandiran
Thu, 26 Feb 2009 05:05
Apply Cell Style to a Table
Author: K.Hemachandiran
Date: Thu, 26 Feb 2009 05:05
Date: Thu, 26 Feb 2009 05:05
10 lines
999 bytes
999 bytes
Hi all, Actually I have set some default properties for each cell in a table. This is for CS3. I have selected a table. Now the problem is I am not able to apply the cell style through script. But I am able to do it manually. Looping through cells and columns takes more time. To reduce it I have choosed this method. I am not able to get the correct method of doing it. Thanks, Hemi
Re: Apply Cell Style to a Table
Author: Dave_Saunders
Date: Thu, 26 Feb 2009 05:28
Date: Thu, 26 Feb 2009 05:28
5 lines
766 bytes
766 bytes
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? Dave
Re: Apply Cell Style to a Table
Author: K.Hemachandiran
Date: Thu, 26 Feb 2009 05:53
Date: Thu, 26 Feb 2009 05:53
1 lines
605 bytes
605 bytes
CS3 Indesign, Javascript
Re: Apply Cell Style to a Table
Author: K.Hemachandiran
Date: Thu, 26 Feb 2009 05:54
Date: Thu, 26 Feb 2009 05:54
1 lines
646 bytes
646 bytes
I am trying to set the same cell style to all cells in the table.
Re: Apply Cell Style to a Table
Author: Dave_Saunders
Date: Thu, 26 Feb 2009 06:05
Date: Thu, 26 Feb 2009 06:05
7 lines
741 bytes
741 bytes
myTable.cells.itemByRange(0,-1).appliedCellStyle = myStyle; which, I believe, is quicker than: myTable.cells.everyItem().appliedCellStyle = myStyle; Dave
Re: Apply Cell Style to a Table
Author: Robert Tkaczyk
Date: Thu, 26 Feb 2009 20:24
Date: Thu, 26 Feb 2009 20:24
16 lines
1373 bytes
1373 bytes
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:
myTable.cells.itemByRange(0,-1).clearCellStyleOverrides;
robin
--
www.adobescripts.com
Re: Apply Cell Style to a Table
Author: K.Hemachandiran
Date: Mon, 02 Mar 2009 04:11
Date: Mon, 02 Mar 2009 04:11
3 lines
651 bytes
651 bytes
Thanks to Both. Hemi
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads