🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18413

Re: Need Help with Using Labels in Script

#18413
From: Stephen Field
Date: Fri, 21 Mar 2003 17:42
23 lines
1693 bytes
Okay,

I am getting somewhere.
I tried to write code that would fill all of my page items that have a label called "test" with a fill color of purple.
I don't get an error message this time - but now it is doing the opposite - it is applying the fill color to only those that are NOT labeled "test". Any help??

Here is my code

Rem ChangeAllPageItems.vbs
Rem An InDesign 2.x script
Rem Applies a specific fill color to all PageItems with a
Rem specified Label called "test"
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
For myCounter = 1 To myDocument.AllPageItems.Count
Set myPageItem = myDocument.AllPageItems.Item(myCounter)
If myPageItem.Label = test Then
Rem Enter the name of your own fill
Rem color in the following line (replace "myFillColor"):
myPageItem.FillColor = myDocument.Swatches.Item("Purple")
Else
End If
Next
Technical Details
Message-ID: <1de8641e.8@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de8641e.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,498c886dd63b1cfe
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-03-21 10:08:27 PST
From: "Stephen Field" <stephenfield@mail.unomaha.edu>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!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: Need Help with Using Labels in Script
Message-ID: <1de8641e.8@WebX.la2eafNXanI>
Date: Fri, 21 Mar 2003 09:42:21 -0800
References: <1de8641e.-1@WebX.la2eafNXanI>
Lines: 26
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit