🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19485

Re: VB Applying Text Frame to Master Page ?

#19485
From: Olav Kvern
Date: Tue, 10 Dec 2002 19:20
31 lines
1594 bytes
Ian--

What you want to do is add the text frames or other page items to the master spread. MasterSpread objects have Pages, just as normal document Spread objects contain Page objects. So there's really no trick to it, just direct the relevant master spread page to create the object.



Rem Given a Document "myDocument" 
Set myMasterSpread = myDocument.MasterSpreads.Item(1) 
Set myMasterPage = myMasterSpread.Pages.Item(1) 
Set myTextFrame = myMasterPage.TextFrames.Add 
myTextFrame.GeometricBounds = Array("6p", "6p", "9p", "18p") 
myTextFrame.TextContents = "Master page text" 




To apply the master spread to a document page, use the Page.AppliedMaster property, as in:



Rem Given a page "myPage"... 
myPage.AppliedMaster = myDocument.MasterSpreads.Item(1) 




Does that help?

Thanks,

Ole
Technical Details
Message-ID: <1de6eb16.4@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de6eb16.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,363ffdf388d06260
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-12-10 11:38:09 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: VB Applying Text Frame to Master Page ?
Message-ID: <1de6eb16.4@WebX.la2eafNXanI>
Date: Tue, 10 Dec 2002 11:20:37 -0800
References: <1de6eb16.-1@WebX.la2eafNXanI>
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit