Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Export list of styles, import into Word doc

Return to Member Forum

  • Author
    Posts
    • #61080
      Cindy Kelley
      Participant

      Hi,

      Since I so often begin jobs cleaning up my client's Word documents before importing them into Indesign, I have begun to either change Word's formatting styles to names that match my Indesign style names or just create them new.

      Would it be possible to import the list of styles from Indesign into Word? I don't care about keeping the formatting, but just the exact naming.

      I have begun to attempt to set up Word templates for reoccuring jobs so I will have those styles available the next time the job comes around but for those jobs that come around less often, the above script would be helpful.

      Thanks for any repsonses and your brain :)

      Cindy in Indy

    • #61082

      Cindy, you can export a sample of your formatted text as RTF, and when opening it into Word you get the exact style names. (I didn't test with complicated style groups, though.)

      There is a tiny caveat emptor: InDesign is smart so it only exports styles that are actually used in the document! Fortunately, this ties nicely in to a script I wrote the week to list each style name in its own style: https://forums.adobe.com/thread…..?tstart=30

      If you run this script once (have the text cursor ready in an otherwise empty text frame), it'll fill it with all of the current paragraph styles. Export to RTF and voila (pardon my French).

      If & when required I can make an amendment to catter for character styles as well.

    • #61094
      Cindy Kelley
      Participant

      :(

      I keep getting a “Result: undefined” error

      I saved the script using Extendscript Toolkit into my Indesign scripts panel.

      What am I doing wrong?

    • #61095

      Ow. I think I need to know more … It sounds like the script is starting up correctly, so you did everything right so far, but it encounters something I did not foresee.

    • #61096
      Cindy Kelley
      Participant

      Let's see…

      When I run it from my Scripts Panel, nothing happens.

      When I open it in ExtendScript using the Indesign pull down menu, it activates Indesign, appears to run then ExtendScript comes to the front and says “Result: undefined” in the JavaScript Console.

      When I open it in ExtendScript leaving the ExtendScript Toolkit CS5 pull down menu, the first line is highlighted orange and it says “undifined is not an object” at the bottom.

      Oh wait, I got your first script to work but not the following one that works with style groups.

    • #61098

      Cindy, the first one is supposed to work for you — style groups and all. The second one was customized at the behalf of Maria964 and only lists styles inside groups (I have no idea at all why she needed that).

      The script blindly inserts its text into the text frame where your text cursor is in, perhaps you got that wrong and it went somewhere else?

    • #61215
      Cindy Kelley
      Participant

      Jongware to the rescue again :)

      I got this to work as needed. Thanks for making my work day go faster.

    • #61226
      Anonymous
      Inactive

      Amazing how many people want something like this lol.

      Thanks again Jongware – it's been great so far!

Viewing 7 reply threads
  • You must be logged in to reply to this topic.
Forum Ads