Article View: adobe.scripting.indesign
Article #774Re: extract items from a frame
From: Peter Kahrel
Date: Tue, 03 Mar 2009 08:18
Date: Tue, 03 Mar 2009 08:18
25 lines
1135 bytes
1135 bytes
Don't know what goes wrong. Try this one -- it does only frames that are embedded and doesn't stop on errors:
myPages = app.activeDocument.pages;
for (i = 0; i < myPages.length; i++)
{
myFrames = myPages[i].allPageItems;
for (j = myFrames.length-1; j > -1; j--)
{
if (myFrames[j].parent.constructor.name = 'Character')
{
try
{
myPages[i].textFrames.add (myFrames[j].properties);
myFrames[j].remove();
}
catch(_){}
}
}
}
Peter
Technical Details
Message-ID:
<59b81716.5@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b81716.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,50e6c9aacf044ae5 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Peter Kahrel" <kahrel@kahrel.plus.com> Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: extract items from a frame Message-ID: <59b81716.5@webcrossing.la2eafNXanI> Date: Tue, 3 Mar 2009 00:18:21 -0800 References: <59b81716.-1@webcrossing.la2eafNXanI> Lines: 24 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit