Have you ever needed to export your entire InDesign document to Word?
I recently needed to, so I fished around for some free scripts to do the job, but I wasn’t able to find exactly what I wanted.
Why a script? Well, InDesign can export text to Word, but only one story at a time. My document was built up of many chapters, and I didn’t want to export them one at a time.
First port of call was one of the scripts that ships with InDesign: Export All Stories. You should be able to locate it under the Samples folder in InDesign’s Scripts palette.
The problem with Export All Stories though, is that it exports each InDesign story as separate Word file. For me, this was a show-stopper. In a book with dozens of chapters, where each chapter is its own story, I ended up with dozens of Word files. And though it is possible to recombine those, that wasn’t what I was looking to do.
So I did a little search, and found Rorohiko’s Text Stitch, which is a free plugin. (By the way, should script and plugin names be set in italics? Books, poems, and ship names all are, so I guess scripts should be too!)
What this great plug-in does is stitch together all the frames in an InDesign document. It says that it uses a careful algorithm to join the frames in the right order.
So, using Text Stitch, I could joing all the chapters into a single story, and then export that.
But there were a couple of reasons I didn’t want to go that route. First, I didn’t want to install a plugin just for this small task (unlike scripts, plugins hook up to InDesign itself, whereas a script is just a file on your harddrive, waiting to be double-clicked). Also, this particular one requires the installation of another first.
But more to the point, it wasn’t quite what I was looking for. I just wanted a one-click solution to export all my text to a single Word file. Although Text Stitch would take me most of the way there, there would remain a few steps after stitching the stories together. So I continued looking.
The results of my googling “export InDesign document to Word” were a bunch of tutorials that all seemed to be suggesting a round-trip via PDF. In other words, first export the ID doc to PDF, and then use Acrobat’s fantastic “export to Word” feature.
Now, if you need your Word file to look as close as possible to the way the InDesign file looks, this is definitely the way to go. Acrobat does a great job of maintaining the layout: not just page breaks are retained, but all graphics, headers, footers, tables, etc.
Thing is, this is not what I was looking for. I just wanted the basic text and formatting. Acrobat’s export squishes the text to make it fit the ID file line for line. Also, everything is broken up with line breaks, and the headers and footers and stuff can interrupt the text flow. And the biggest problem: You can kiss all your paragraph and character styles goodbye!
So no – exporting from Acrobat was not the solution. It’s definitely a great way to maintain fidelity to the InDesign file, and if that’s what you need, it’s the tool to use. But it wasn’t what I was looking to do.
At this stage I gave up. Perhaps I shouldn’t have, because I have since found another script that seems much closer to what I was looking for: Export all Text.
Had I found it, I definitely would have given it a spin. However, my googling skills being such as they are, it evaded my searches, and I decided to write my own. So I haven’t actually tested Export all Text, but I recommend you give it a shot!
Export to Word is Born!
And thus Export to Word was born!
It does exactly what I wanted, because that’s the joy in writing your own scripts: They do exactly what you want!
In this case, that means that with zero hassle you can now export an entire InDesign document to Word.
To use, just open an InDesign document, double-click on the script, click OK, select your target folder (to save the Word file to), and wait a few moments. Your InDesign file should then open up in Word! Hooray!
Export to Word deliberately excludes any text on master pages. It will export all text on live InDesign pages, including stuff on the pasteboard. Like Rorohiko’s Text Stitch, it makes a simple attempt to export the text in the proper order (form start to finish, and, if there are multiple text frames on a single page, from top to bottom).
Since it is just using InDesign’s built-in “export to RTF” feature, it works in the same way: It will not export graphics in the InDesign file, except anchored objects, which do carry over, but it does export tables and footnotes.
So here is the script.
Use it wisely and it will serve you faithfully for many years to come J !