You must be logged in to post Login

Search Forums:


 






Export list of styles, import into Word doc

UserPost

8:22 am
November 17, 2011


tabaholic

Member

posts 24

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

9:35 am
November 17, 2011


Jongware

Member

posts 764

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: http://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.

9:27 am
November 18, 2011


tabaholic

Member

posts 24

:(

I keep getting a "Result: undefined" error

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

What am I doing wrong?

9:50 am
November 18, 2011


Jongware

Member

posts 764

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.

11:23 am
November 18, 2011


tabaholic

Member

posts 24

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.

1:54 pm
November 18, 2011


Jongware

Member

posts 764

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?

4:09 pm
December 3, 2011


tabaholic

Member

posts 24

Jongware to the rescue again :)


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


5:00 am
December 5, 2011


Eugene Tyson

Member

posts 653

Amazing how many people want something like this lol.


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

"Ingenious, isn't it, Mr. Bunt? "