Article View: adobe.scripting.indesign
Article #10156[JS] [CS2] Tables / SmartStyles [OT]
From: CariJansen
Date: Tue, 04 Jul 2006 17:00
Date: Tue, 04 Jul 2006 17:00
26 lines
1654 bytes
1654 bytes
Scenario: 600+tables requiring reformatting on regular basis. Then reformatting one table and creating a smart style, which then is applied to all other tables in document. Each table resides in an individual text frame (no threading).
Have been puzzling on this one for a quite a few hours now... and can't get the script working fully and am hoping someone has worked with smart styles scripting before. I will post the script publicly once I've got it up and running.
script snippet below:
for (i=0; myStory < TOTAL_STORIES; i++) {
myStory = myDoc.stories[i];
myLibName = "Smart Styles.indl";
myItemName = "tableFormat";
myLib = app.libraries.item(myLibName);
myLibItem = myLib.assets.item(myItemName);
myTable = myStory.tables.item(0);
myLibItem.applySmartStyle(myTable);
Most of the checks, functions that form part of the overall script work, however, the last line in the snippet gives an error that applySmartStyle expects an array of PageItems, and can't receive a table.
Technical Details
Message-ID:
<3bc0cec5.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!newsfeed.freenet.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,652d17b9ba2c5279,start X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: CariJansen@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: [JS] [CS2] Tables / SmartStyles [OT] Message-ID: <3bc0cec5.-1@webcrossing.la2eafNXanI> Date: Tue, 4 Jul 2006 10:00:44 -0700 Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!newsfeed.freenet.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing