Article View: adobe.scripting.indesign
Article #18053Re: Moving thru a Doc (VB)
From: Iolaire McFadden
Date: Fri, 25 Apr 2003 20:54
Date: Fri, 25 Apr 2003 20:54
32 lines
1869 bytes
1869 bytes
Why don't you play with this, it works for me on some frames but not the others. It is a starting point though, just start testing from here.
Public myInDesign As InDesign.Application
Public myDocument As InDesign.Document
Sub leading()
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
' count text frames so you can loop through and modify paragraphs
num_textframes = myDocument.TextFrames.Count
' loop through each text frame
For textframe_loop = num_textframes To 1 Step -1
' activate the text frame
Set myFrame = myDocument.TextFrames.Item(textframe_loop)
' select the paragraphs
Set myParagraph = myFrame.Paragraphs
' count paragraphs in frame
my_par_count = myParagraph.Count
If my_par_count = 1 Then
Else
End If
For par_loop = my_par_count To 1 Step -1
Set my_par_to_change = myParagraph.Item(par_loop)
' change leading
my_par_to_change.leading = 60
' next par_loop loop
Next
' next textframe_loop loop
Next
End Sub
Via testing and the scripting manual you should be able to do what you want.
Good luck,
iolaire
Technical Details
Message-ID:
<1de8d969.1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de8d969.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,1947ddd4f96df251 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-25 14:08:08 PST From: "Iolaire McFadden" <imcfadden@costar.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Moving thru a Doc (VB) Message-ID: <1de8d969.1@WebX.la2eafNXanI> Date: Fri, 25 Apr 2003 13:54:03 -0700 References: <1de8d969.-1@WebX.la2eafNXanI> Lines: 34 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit