Article View: adobe.scripting.indesign
Article #8437Replace Character style "None" with new style [AS, CS2]
From: Jim_Heissenbuttel
Date: Fri, 13 Oct 2006 18:57
Date: Fri, 13 Oct 2006 18:57
18 lines
1582 bytes
1582 bytes
I need to ensure that all text in my document has a character style applies, so I would like to replace the InDesigns chaaracter style "[None]" with one of my own making, "NoStyle". Here is the script:
set myCharacterStyle to character style "NoStyle"
set find preferences to nothing
set change preferences to nothing
set mySelection to document
search with find attributes {applied character style:noCharacterStyle} �
with change attributes {applied character style:myCharacterStyle}
The problem I am having is that InDesign gives me the following error on the search line (copied form Event Log):
search current application with find attributes {applied character style:"[None]"} with change attributes {applied character style:character style id 260} "Adobe InDesign CS2 got an error: Invalid parameter."
What doe invalid parameter mean here? I have seen many other recommending this logic and not once have I seen someone say they got an error for it.
Any help is appreciated.
jh
Technical Details
Message-ID:
<3bc1f6be.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!news.ecp.fr!news.stben.net!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,742dfd689ac52e08,start X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII From: Jim_Heissenbuttel@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Replace Character style "None" with new style [AS, CS2] Message-ID: <3bc1f6be.-1@webcrossing.la2eafNXanI> Date: Fri, 13 Oct 2006 11:57:14 -0700 Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!news.ecp.fr!news.stben.net!webcrossing