Article View: adobe.scripting.indesign
Article #16952Re: Changing fillcolor to None (VB)
From: Olav Kvern
Date: Tue, 08 Jul 2003 15:15
Date: Tue, 08 Jul 2003 15:15
20 lines
1480 bytes
1480 bytes
Dmitri--
You can't count on the swatch "None" being the first swatch--swatches in the Swatches palette can be rearranged by the user. When this happens, the index of the swatch will change.
Therefore, it's better to use the name to refer to the swatch:
Rem Given a reference to a document "myDocument" ("Set" is required in VB6)
Set mySwatchNone to myDocument.Swatches.Item("None")
myDocument.Selection.Item(1).FillColor = mySwatchNone
Also, when you refer to the myInDesign.Swatches.Item("None"), you're referring to the default swatch "None" of the Application object. Instead, refer to the swatch "None" of the document containing the object. (Using the application swatch won't work, and will probably generate an error.)
Thanks,
Ole
Technical Details
Message-ID:
<1de9d26b.4@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de9d26b.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,f626fafc1d51ce0a X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-07-08 08:38:06 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-08!supernews.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Changing fillcolor to None (VB) Message-ID: <1de9d26b.4@WebX.la2eafNXanI> Date: Tue, 8 Jul 2003 08:15:41 -0700 References: <1de9d26b.-1@WebX.la2eafNXanI> Lines: 23 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit