🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19164

Re: vb script for bullets

#19164
From: pjredman
Date: Tue, 14 Jan 2003 17:10
32 lines
2544 bytes
Stephen,

This script that was previously posted on the forum should do it. Sorry, I don't recall who the original poster was.

Phil Redman

If List1.Selected(8) = True Then
On Error Resume Next
Text2.Visible = True
Text2.Text = "Working..."
Rem Enter the name of the paragraph style you want to apply bullets to:
myParaStyleName = "List Bullet"
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 "bullet" in Times-Roman):
myBulletCharacter = "<2022>"
Rem Enter the separator character(s) you want to insert between the bullet character and the first character in the paragraph:
mySeparator = vbTab
Rem Clear Find/Change preferences
myInDesign.FindPreferences = idNothing
myInDesign.ChangePreferences = idNothing
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
Technical Details
Message-ID: <1de75c06.0@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!feedwest.aleron.net!aleron.net!sfo2-feed1.news.algx.net!allegiance!logbridge.uoregon.edu!news.stupi.se!news.stupi.se!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!diablo.netcom.net.uk!netcom.net.uk!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de75c06.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,604e85343333d815
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-01-14 09:40:02 PST
From: pjredman <pjredman@usgs.gov>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!feedwest.aleron.net!aleron.net!sfo2-feed1.news.algx.net!allegiance!logbridge.uoregon.edu!news.stupi.se!news.stupi.se!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!diablo.netcom.net.uk!netcom.net.uk!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: vb script for bullets
Message-ID: <1de75c06.0@WebX.la2eafNXanI>
Date: Tue, 14 Jan 2003 09:10:57 -0800
References: <1de75c06.-1@WebX.la2eafNXanI>
Lines: 39
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit