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.
To download a 7-day trial of the script, please fill in your name and email below and it will be sent to you automatically. By doing so you also agree to receive occasional emails from Id-Extras.com with interesting InDesign tips and tricks, news, and free scripts.
Terms and Conditions: (1) The 7-day trial of the script is for personal use only. For commercial use, please purchase a subscription to the Pro version ($49/year). (2) Please do not redistribute this script in any way without written permission from Id-Extras.com. You may of course link to this webpage, but do not redistribute the script itself. Thank you for your understanding!
Enjoy the script 🙂 !
The PRO Version
The pro version is an updated and improved version of this script. Export to Word PRO lets you export an entire InDesign doc to Word with a single click just like its baby brother above. But it includes the following 5 features not found in the trial version:
- It may be used for commercial purposes, not just for personal use like the trial version.
- (Optional) Page size is maintained in the exported Word file. The page size of the Word file will match the size of the InDesign page.
- (Optional) Margins are maintained. The margins in the Word file will be set to the same margins as the first page of the InDesign file.
- (Optional) Page breaks are maintained. Instead of all chapters running on as a single long Word file, the Pro version will insert chapter breaks where they exist in InDesign. Specifically, if a new story starts on a new page in InDesign, it will do so in Word as well.
- Export selected stories only. You may choose to export stories on visible layers only. So if you don’t need to export everything, hide the layer that the first text frame of the story is on.
These pro features, if selected, make the end Word file look much more similar to the InDesign and, as a result, easier to handle in many cases.
Export to Word PRO is available for only $49/year (annual subscription). Click on the link below to purchase and enjoy immediate download. You’ll be up and running in no time.
Petr M. DorazilJanuary 26, 2017 4:45 pm
Hello.
Thank you for script. I like it very much. Mostly works perfectly, but… Is there any possibility to export bullets and numbered lists correctly?
Petr
AdminJanuary 26, 2017 5:14 pm
Thanks Petr.
The issue of disappearing bullets and numbered lists is an ancient one, and it’s a shame it hasn’t been fixed yet. You’re going to have to use some sort of workaround here. Either convert all bullets and numbering to text before exporting to Word (as described in this old, but still relevant, article here: http://indesignsecrets.com/convert-numbering-to-text-in-indesign.php), or else tag your bulleted and numbering lists with special paragraph styles (paragraph styles do carry through to Word), and then rebuild the lists quickly there by modifying the paragraph styles.
Good luck!
Petr M. DorazilMarch 16, 2017 5:49 pm
Thank you for your answer. The solution with paragraph styles looks better for me.
Yoel BroderickMarch 6, 2017 9:28 pm
Great script!
Thanks again Ariel for another wonderful script. I’ve always had to this the tedious, manual way. Keep up the good work!
Gregory MouningMarch 27, 2017 6:45 pm
Thanks for this script. It should save me a lot of time.
Is there a similar script on this site that will do the reverse; Import Word documents into InDesign?
ArielMarch 27, 2017 7:07 pm
Gregory,
Check out this blog post: http://www.id-extras.com/multi-file-auto-place
It provides a bare-bones solution to automatically placing multiple Word files into InDesign.
It was eventually developed into a much more robust solution, with checks for perpetual overset, intelligent use of object styles and master pages, etc.
If you’d like to know more about that, drop me a line.
Greg MouningMarch 28, 2017 5:06 pm
Thanks Ariel. The “multi-file-auto-place” script was very helpful. I was hoping it might do a better job with some of the graphics.
Perhaps you can send me a copy of the more robust version. I have a couple of more complex word documents and I’d like to see these results.
DubsJuly 20, 2017 5:01 am
Thanks for the script, but I’m having some difficulty. Any idea how to get around this alert box?
JavaScript Error!
Error Number: 55
Error String: Object does not support the property or method ‘parentPage’
Engine: main
File: /Users/ … /Scripts/Scripts Panel/ExportToWord.jsxbin
Line: 59
ArielJuly 22, 2017 11:10 pm
Hi Dubs,
Hard to say what the problem might be without seeing the file. But from the sounds of it, check whether there isn’t a text frame on the pasteboard somewhere in the document. If there is, try dragging it onto a page. Likewise, try to make sure there is no overset text in the document.
HTH,
Ariel
philippAugust 12, 2017 1:54 pm
Might be a version issue. The script worked fine with ID2015, stopped after updating to ID2017
ArielAugust 13, 2017 6:24 pm
Hi Philipp,
I just tested it with CC2017 on both Windows and Mac and it works fine.
If there’s a problem, it’s probably something to do with the way the file is constructed — I’ll be happy to take a look, but would need to examine the InDesign file itself.
Ariel
AnnaSeptember 26, 2017 6:52 pm
I’m having the same issue as Philipp. I ran Parent Page script to locate where the issues were occurring. It came back with the error of Text Frame is bad. How do I address this?
If you need to see the file, please let me know.
Thanks!
ArielSeptember 27, 2017 1:02 am
Hi Anna,
Sure, you can send the file to admin [at] id-extras.com and I’ll be happy to take a quick look.
Ariel
AnnaSeptember 27, 2017 4:55 pm
Hi, Ariel:
I just sent you an email.
And again, thank you in advance!
Anna
ArielSeptember 27, 2017 7:23 pm
Ok, Anna kindly sent me her file to test.
The issue seems to be “text on a path”. If the InDesign file has text on a path somewhere, the script breaks down.
I will try and fix this and post an update, but meanwhile, if you’re having a problem, try to temporarily delete the text on a path, or change it to a regular text frame.
Ariel
AnnaSeptember 27, 2017 9:55 pm
Thanks, Ariel. I sent you an email with a script that may or may not help. Let me know if you have any questions for me as you’re trying to fix this bug.
Anna
RakeshNovember 23, 2017 11:00 am
Me too getting the JavaScript Error!
Error Number: 55
Error String: Object does not support the property or method ‘parentPage’
Engine: main
File: /Users/ … /Scripts/Scripts Panel/ExportToWord.jsxbin
Line: 59
ArielDecember 14, 2017 4:31 pm
Announcement: I just uploaded a new version which works fine also when the InDesign document includes text-on-a-path and now includes such text in the final output final.
Enjoy!
Jeenee LeeJanuary 30, 2018 1:32 am
Thanks so much for creating and sharing this script, it worked like a charm.
DerekFebruary 9, 2018 11:18 am
I seem to be missing a trick here, I have downloaded and unzipped the file and all I get is a load of script on a word pad. What should I open it with
ArielMay 22, 2018 3:28 pm
Derek: To install an InDesign script, following the instructions on this page: https://www.danrodney.com/scripts/directions-installingscripts.html
jFalnerNovember 4, 2018 11:51 am
Nice script, but it seems to fail in migrating any words applied with an italic character style. (Oddly enough, it has no problem with punctuation like quotation marks, only letters.) Note that this is applied STYLE, not a change of typeface—QuarkXPress and Indesign play quite nicely when it comes to character/paragraph styles, but Office insists on being an obnoxious beast. Your script is running quite nicely under my beloved Indesign CS6—processing time is quite speedy, and it seems quite stable.
One suggestion I would like to make is to not launch Office/Word upon conversion of an Indesign document. When working with several conversions, it is more convenient to convert several at a whack, then go move over into Office and tune and tweak in a more logical work flow. Perhaps an option for that could be added so that Office doesn’t pop up every time.
I’d also like to suggest that hyphenation rules be strictly followed from the Indesign source. I note that Export To Word introduces hyphenation, but the documents I work on in Indesign have hyphenation universally turned off at client request. Having to go back and remove all those newly-hyphenated words is quite a pain.
But all said, I quite like what you’ve done with the script. I look forward to seeing (and perhaps purchasing) a future version which addresses some of these obscure details. Excellent work!
ArielJanuary 4, 2019 4:25 pm
The script uses InDesign’s own “export to RTF” feature, so if character styles aren’t being preserved properly, that’s because that feature doesn’t support it. However, I’m a bit surprised because I think it does actually export character styles. Needs looking into when I get a chance.
The suggestion for not automatically opening in Word makes sense. This is something I would consider adding to the Pro version.
Hyphenation rules: Same as my first answer. This is something that is based on the RTF export feature.
The PRO version does actually go in and manually modify the exported RTF (to set margins and page size appropriately). So it could perhaps be made to disable all hyphenation — but I can’t foresee doing that except as a custom scripting request which I’ll be happy to quote for.
Otherwise, thanks for your kind words!