🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20605

Re: Moving text strips its characteristics

#20605
From: Olav Kvern
Date: Fri, 14 Jun 2002 18:56
35 lines
2210 bytes
Mike-- 

How about this? 

Dim myInDesign As InDesign.Application 
Set myInDesign = CreateObject("InDesign.Application.2.0") 
Rem Create a dummy document 
Set myDocument = myInDesign.Documents.Add 
Set myParaStyle = myDocument.ParaStyles.Add 
myParaStyle.FillColor = myDocument.Colors.Item(myDocument.Colors.Count) 
Set myPage = myDocument.Pages.Item(1) 
Set myTextFrame = myPage.TextFrames.Add 
myX1 = myPage.MarginPreferences.MarginLeft 
myY1 = myPage.MarginPreferences.MarginTop 
myX2 = myDocument.DocumentPreferences.PageWidth - myPage.MarginPreferences.MarginRight 
myY2 = myDocument.DocumentPreferences.PageHeight / 2 
myTextFrame.GeometricBounds = Array(myY1, myX1, myY2, myX2) 
myTextFrame.TextContents = idPlaceholderText 
myTextFrame.Paragraphs.Item(2).ParagraphStyle = myParaStyle 
Rem Create a new text frame below the existing text frame 
Set myNewTextFrame = myPage.TextFrames.Add 
myNewTextFrame.GeometricBounds = Array(myY2, myX1, myDocument.DocumentPreferences.PageHeight - myPage.MarginPreferences.MarginBottom, myX2) 
Rem Move the formatted paragraph into the new text frame 
Rem Provide the idLocationOptions enum: idAfter, idAtBeginning, idBefore, idAtEnd 
Rem and a valid text object reference. 
myTextFrame.Paragraphs.Item(2).Move idAtBeginning, myNewTextFrame.ParentStory 
 

re: "It may be simple for you..." 

My job is to make it simple for you, too.<g> 

Thanks, 

Ole
Technical Details
Message-ID: <ef9207f.3@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!nntp2.aus1.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!amsnews01.chello.com!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <ef9207f.-1@WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,32a5b3bee695af2b
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-06-14 12:08:29 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!nntp2.aus1.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!amsnews01.chello.com!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Moving text strips its characteristics
Message-ID: <ef9207f.3@WebX.aaQKaf7vad4>
Date: Fri, 14 Jun 2002 11:56:29 -0700
References: <ef9207f.-1@WebX.aaQKaf7vad4>
Lines: 39
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit