🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20592

Re: Bullet script

#20592
From: Olav Kvern
Date: Thu, 13 Jun 2002 19:01
9 lines
2193 bytes
Phil-- 

Here you go! 

Dim myInDesign As InDesign.Application Rem Enter the name of the paragraph style you want to apply bullets to: myParaStyleName = "list" Rem Enter the name of the character style you want to apply to your bullet character in the following line: myBulletStyleName = "myBullet" Rem Enter the bullet character as a Unicode string in the following line (this one is a "u" in Zapf Dingbats): myBulletCharacter = "<E075>" Rem Enter the separator character(s) you want to insert between the bullet character and the first character in the paragraph: mySeparator = vbTab Set myInDesign = CreateObject("InDesign.Application.2.0") Rem Clear Find/Change preferences myInDesign.FindPreferences = idNothing myInDesign.ChangePreferences = idNothing Set myDocument = myInDesign.ActiveDocument myInDesign.FindPreferences.ParagraphStyle = myDocument.ParaStyles.Item(myParaStyleName) Set myFoundItems = myDocument.Search For myCounter = myFoundItems.Count To 1 Step -1     Set myItem = myFoundItems.Item(myCounter)     Rem myItem might contain more than one paragraph, so we'll iterate.     For myParagraphCounter = myItem.Paragraphs.Count To 1 Step -1         Set myParagraph = myItem.Paragraphs.Item(myParagraphCounter)         myParagraph.InsertionPoints.Item(1).CharacterStyle = myDocument.CharStyles.Item(myBulletStyleName)         myParagraph.InsertionPoints.Item(1).TextContents = myBulletCharacter & mySeparator     Next Next  

Thanks, 

Ole
Technical Details
Message-ID: <ef914f2.3@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news-xfer2.newshosting.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <ef914f2.-1@WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,d395462a0248ea1b
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-06-13 12:08:35 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news-xfer2.newshosting.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Bullet script
Message-ID: <ef914f2.3@WebX.aaQKaf7vad4>
Date: Thu, 13 Jun 2002 12:01:59 -0700
References: <ef914f2.-1@WebX.aaQKaf7vad4>
Lines: 40
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit