Article View: adobe.scripting.indesign
Article #20384Re: Linking Master TextFrames
From: Peter Boctor
Date: Sun, 28 Jul 2002 20:56
Date: Sun, 28 Jul 2002 20:56
26 lines
1820 bytes
1820 bytes
Tony,
The "Master Text Frame" checkbox only exists in the "New Document" dialog box. It simply puts a text frame on the pages on the master. You can accomplish the same thing from scripting by simply creating a text frame on the master spread.
To access a text frame that appears on a master, you first need to detach them from the master by overriding them, then you can get/set the frames' previous/next properties.
Here is an example:
Set ID = CreateObject("InDesign.Application")
Set myDoc = ID.Documents.Item(1)
Set myMaster = myDoc.MasterSpreads.Item(1)
' Add the first page
Set newPage1 = myDoc.Pages.Add
' Set the first page's applied master
Set newPage1.AppliedMaster = myMaster
' Override the text frame on page 1
Set newFrame1 = newPage1.MasterPageItems.Item(1)
' Add the second page
Set newPage2 = myDoc.Pages.Add
' Set the second page's applied master
Set newPage2.AppliedMaster = myMaster
' Override the text frame on page 2
Set newFrame2 = newPage2.MasterPageItems.Item(1)
' Connect both frames together
Set newFrame1.NextTextFrame = newFrame2
-peter
Technical Details
Message-ID:
<ef9d47b.2@WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<ef9d47b.-1@WebX.aaQKaf7vad4>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,92ef3bc7c6a85f04 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-07-28 14:14:37 PST From: "Peter Boctor" <peter.boctor@adobe.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Linking Master TextFrames Message-ID: <ef9d47b.2@WebX.aaQKaf7vad4> Date: Sun, 28 Jul 2002 13:56:43 -0700 References: <ef9d47b.-1@WebX.aaQKaf7vad4> Lines: 24 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit