Article View: adobe.scripting.indesign
Article #16772Re: PAGEITEMS COPY
From: Iolaire McFadden
Date: Fri, 01 Aug 2003 12:43
Date: Fri, 01 Aug 2003 12:43
27 lines
1942 bytes
1942 bytes
Please could someone provide an example of how to climb up the page items to find the spread? I've been trying to do this. Most of my testing was by looking at the locals window to find a parent of myPageItem that has the spreads property. But I only find spreads at the top level where all 26 spreads are shown.
Sub testing()
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
Set myholdingart = myDocument.PageItems.Item("text_frame_to_find")
Set my_page_items = myDocument.AllPageItems
count_page_items = my_page_items.Count
For loop_name = 1 To count_page_items
loop_item_name = my_page_items.Item(loop_name).Label
If loop_item_name = "text_frame_to_find" Then
' at my_object level I can not find spreads
Set my_object = my_page_items.Item(loop_name)
' I keep going up until
' I find all of spreads at this level
set my_object_parent = my_page_items.Item(loop_name).Parent.Parent.Parent
Else
End If
Next
end sub
So please could someone point me in the right direction to climb up the parent?
Thanks,
iolaire
Technical Details
Message-ID:
<1dea2073.5@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1dea2073.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,86125cabd21b391d X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-08-01 06:07:43 PST From: "Iolaire McFadden" <imcfadden@costar.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: PAGEITEMS COPY Message-ID: <1dea2073.5@WebX.la2eafNXanI> Date: Fri, 1 Aug 2003 05:43:15 -0700 References: <1dea2073.-1@WebX.la2eafNXanI> Lines: 33 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit