• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Indesign Paragrpah style remapping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Indesign Paragrpah style remapping


  • Subject: Re: Indesign Paragrpah style remapping
  • From: Stan Cleveland <email@hidden>
  • Date: Thu, 07 Jun 2007 17:35:53 -0700
  • Thread-topic: Indesign Paragrpah style remapping

On 6/7/07 5:02 PM, Patrik B. wrote:

> I am trying to reassign different paragraphs styles in 15 different documents.
> Currently I have a list of about 20 paragraph style sheets and 20 character
> style sheets.
>
> My repeat loop works fine however I have a problem with the apply new
> paragraph statement
>
> here is the code that does not work
>
> set mystyles to every applied paragraph style of every text style range of
> every story of document 1 whose name is "Paragraph Style 1" (* everything
> after document 1 does not work - how do I word this part or do I have to
> simply cycle through each style *)
> repeat with i in mystyles
> tell text style range of every story of document 1 with applied paragraph
> style (* this part does not work either - it is very easy to just assign one
> style to all but when I am not sure how to word it in order to just address
> one specific instance of a text style range *)
> apply style using mynewstyle with clearing overrides
> end
> end
>
> Any ideas? Is it my syntax or a limitation of indesign cs2?

Patrik,

Here's some code that should get you headed in the right direction:

tell application "Adobe InDesign CS2"
    tell document 1
        set textRuns to object reference of text style ranges of every story
            whose name of applied paragraph style is "Paragraph Style 1"
        apply style textRuns using paragraph style "Paragraph Style 2" with
            clearing overrides
    end tell
end tell

There should be two long lines between the "tell" and "end tell". Rather
than looping through the list of text ranges, you can change them all at
once, as the code above demonstrates. HTH.

Stan C.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Indesign Paragrpah style remapping (From: "Patrik B." <email@hidden>)

  • Prev by Date: Indesign Paragrpah style remapping
  • Next by Date: Re: TextEdit print to PDF and Mail
  • Previous by thread: Indesign Paragrpah style remapping
  • Next by thread: Adobe Reader 8.1.0 applescript suppport broken
  • Index(es):
    • Date
    • Thread