🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16321

[VB] Adding TextFrames through a document

#16321
From: Guy Verville
Date: Wed, 24 Sep 2003 18:54
26 lines
1743 bytes
I have difficulty to know which Objects to use to do the following:

I want to add textframes through all the pages of a document. The following doesn't work. All the textframes are placed on the first page, becase the command MyDoc.Place place the TextFrame on the ActiveWindow. My problem is that I want a TextFrame placed on EACH page (if the spread has 2 pages, hence, two TextFrames.

      Set myID = CreateObject("InDesign.Application.2.0")
      Set myDoc = MyID.ActiveDocument 'Opens a library
      Set myLib = myID.open("f:\production\Librairie g�n�rale.indl")
      'Select a specific TextFrame called "Note"
      Set CDN= myLib.Assets.Item("Note")
      'Counts the pages
      NombrePages = MyDoc.Pages.Count




' Here, all the textframes a placed on the first page!

      	For k =1 to NombrePages
      		Set MyPage = MyDoc.Pages.Item(k)
      		CDN.Place MyDoc
      		Set DocCDN = myID.Selection.Item(1)
      	Next

Thanks to help!

Guy
Technical Details
Message-ID: <2ccd86be.-1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!diablo.voicenet.com!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webx

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,f8cc122249d460a8,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-09-24 12:07:46 PST
From: "Guy Verville" <taddeus@spamcop.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!diablo.voicenet.com!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: [VB] Adding TextFrames through a document
Message-ID: <2ccd86be.-1@webx.la2eafNXanI>
Date: Wed, 24 Sep 2003 11:54:08 -0700
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit