🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8653

Re: [VB] Getting a reference to last inserted PageItem

#8653
From: Dave_Saunders
Date: Tue, 03 Oct 2006 11:18
7 lines
1492 bytes
The order of page items (when referenced by index) reflects the front to back order on the page. Items on the front layer have the lowest index and within each layer, they're in the order front to back.

So, you can't use the index to get the "last INSERTED or created object" because it all depends where it was inserted or created. Also, if the page item was inserted into or created in a story as an inline or anchored object, the document's page items collection (or text frames collection) won't even include it. [You can use allPageItems to get an array of references, but that too will not give any particular precedence to the last created object.]

If you scripted the creation of the object, then you could have created a reference to it then and that can be used to refer to it later in the script.

Dave
Technical Details
Message-ID: <3bc1d7c2.2@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing
References: <3bc1d7c2.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,2daf2f636dcf342a
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Dave_Saunders@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: [VB] Getting a reference to last inserted PageItem
Message-ID: <3bc1d7c2.2@webcrossing.la2eafNXanI>
Date: Tue, 3 Oct 2006 04:18:26 -0700
References: <3bc1d7c2.-1@webcrossing.la2eafNXanI>
Lines: 17
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit