Article View: adobe.scripting.indesign
Article #9835Re: [VB] How to apply ParaStyle to range of cells in table ?
From: Dave_Saunders
Date: Wed, 19 Jul 2006 12:11
Date: Wed, 19 Jul 2006 12:11
17 lines
1396 bytes
1396 bytes
I just did this in JS with the top row of a table selected: myCells = app.selection[0]; myCells.cells.everyItem().texts[0].appliedParagraphStyle = "tableColHead"; and it worked. But I don't think VB has an equivalent to everyItem(). You can also use this to assign a paragraph style to any rectangular selection of cells in a table. Note though that if the selection is not rectangular (because of a merged cell sticking out of the selection rectangle) the selection cannot be processed by a script. Yuck! This also works. Does VB have ItemByRange? myCells = app.selection[0]; start = myCells.cells[0]; end = myCells.cells[-1]; myCells.cells.itemByRange(start, end).texts[0].appliedParagraphStyle = "table entry" Dave
Technical Details
Message-ID:
<3bc0f55a.2@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed.freenet.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc0f55a.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,a5d60b8eced08491 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Dave_Saunders@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: [VB] How to apply ParaStyle to range of cells in table ? Message-ID: <3bc0f55a.2@webcrossing.la2eafNXanI> Date: Wed, 19 Jul 2006 05:11:34 -0700 References: <3bc0f55a.-1@webcrossing.la2eafNXanI> Lines: 22 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed.freenet.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing