Merge multiple Word *.docx files into a single document

How do I merge many Word docx files into a single document?

Please re-open your question (click on … below it, then on the “pencile” icon to enter edit mode) to:

  • mention OS name and LO version (exact four numbers at least, better output of Help>About LO where you have a button to copy this information into the clipboard)
  • elaborate on what you want to do
    Do you want to “simply” bind together several files in order to print the collection in one go?
    Are there references across files?
    Is there some “common structure” among the file? Is their order important for numbering chapters, lists, …?

Be aware that Writer can read DOCX files to some extent but this requires a conversion and, apart from very elementary documents, many features will be translated to something deemed equivalent but not exactly the same. Therefore there are distortions when feeding any application with non-native format.

Usually, visual appearance is roughly acceptable but formatting revision becomes quickly a nightmare because there is a lot of (internal technical) information loss in the process.

Thanks for your response but with respect if LiberOffice is to be fully compatible with Word, it should be able to handle this and all capabilities or else it is not a decent alternative. I have 300 Word 2010 *.docx files I currently merge together into a single document using VBA code but is has reached a size where Word cannot handle it. So it appears both LO and Word cannot be used.

Dr. Larry . Smith

It will never be; there’s even no such goal. The two programs are built around different document models, which in some cases are internally, fundamentally incompatible, so the “full compatibility” is impossible even theoretically. Word simply can’t reproduce some Writer features; Writer can’t reproduce some things possible in Word, in the same way. The ongoing improvement of compatibility is known to only handle what is possible.

should have the same limitation and like

your files. That would be called bug-for-bug compatibility.
.
To solve your problem it would be useful to find out, if a current Word could handle your file, if sufficient RAM and CPU power is available, or if you are really pushing some internal limits.
But actually I guess it would be wise to re-design your project to avoid having one big file for this. I remember splitted projects in TeX and Writer has Master-Documents, but that’s up to you.

I agree with you it will never be but don’t understand why they are two different models. They are word processors and when Microsoft went after Word Perfect, they succeeded in capitalizing the market due to the inadequate marketing of the company that owned WP at the time and WP is still alive at Corel today. image001.jpgI was very irritated at the time this switch happened as I was forced to use Word at the companies I worked for and was very irritated at how much of the word processing terminology was changed and literally made-up by Microsoft. WP had a really neat way to merge multiple document into one which I consider a basic function of any word processor and other types of applications. I see this as a very easy feature for LO.

So in summary Mike I’m not seeing what your analogy is here so please enlighten me. If the future development of Writer is just to see what is possible, how about adding a menu item to merge several files at once into a document?

Dr. Larry W. Smith

Thanks for the feedback and I would do as you suggest but I must create a single document for Table of Contents and Indexing for references to content. I have over 4,000 inline images which is most likely causing my problem with and here is something I forgot to mention: The current WP version handles this just fine but I can’t use it for this task. I have suggested LO implement a batch file merge capability like WP has.

Dr. Larry W. Smith

The master+sub-documents feature is made for this kind of purpose. Consider the master document (.odm extension) is a binder for the others. It can have some own contents like cover page, TOC, various indexes, introduction, … You enumerate the sub-documents in a special panel of the Navigator.

I suppose your sub-docs can remain .docx but you must check that heading paragraphs (those for chapter, sub-chapter, … headings) are recognised by Writer otherwise you’ll have to convert your documents to .odt and style those headings as Heading n paragraph styles.

This may effectively be the main problem. If your images need scaling and cropping inside Writer, this will adversely impact performance. Writer is a document processor, not an image editor. When you have so many pictures, make sure everything is prepared outside Writer so that the images are taken “as is”, without any transformation.

Whatever you decide, you’ll have to read the Writer Guide to understand a minimum about the document model and learn how to use the master+subs feature.

It may be possible to script the creation/import of sub-documents to avoid doing this for your 300 files manually. I never tried, as my projects were slowly growing.
.
Inserting may also be scripted, but depending on your hardware you may run in the same problems as with Word.
.

Actually only a combined reference and toc wich is available from all sub-documents is necessary. In TeX you can see this better, as there are separate .aux and .toc-files visible in the folders.
.
As s PS: Word2019 also has Master and Subdocuments, but I have not used Word for years …
.
In a way it is quite funny. You work with Word, wich is not capable to handle the result. You claim WP would handle it,

As a result you ask at LO to implement a feature, which may not solve your problem…

Thanks for your feedback but now sure how to use the Master/Sub-document feature. I have 299 Word .docx files and the first one I call “Front matter.docx” which I could use as the Master LO document I suppose but what about and all the other 299 .docx files? The question I still have is how do I merge them all together without having to convert them all to .odt files?

I didn’t provide any analogy at all. I directly answered a very specific bit that you wrote:

I explained that this idea is incorrect, because LibreOffice has no goal of being fully compatible, because the architectures have fundamental differences in areas where LibreOffice creators had different ideas how this or that aspect of an office suite is best done. No analogies, subtopic answered, period.

Now you started to talk about “market capitalization”; it’s you who put some analogies between Word or WP, and Writer. Here is another direct answer to a small subtopic: market capitalization is not a goal of The Document Foundation (a non-profit organization that is behind LibreOffice). Commercial companies that are part of the community, of course, are part of the market games, but not the project itself.

At the same time, my answers don’t even try to address your actual issue. Others try to help you to solve / workaround it.

Well no worries as I use WP which solved my problem.

BTW you used the word “theoretical” in your previous response and that was weird: “It will never be; there’s even no such goal. The two programs are built around different document models, which in some cases are internally, fundamentally incompatible, so the “full compatibility” is impossible even theoretically. Word simply can’t reproduce some Writer features; Writer can’t reproduce some things possible in Word, in the same way. The ongoing improvement of compatibility is known to only handle what is possible.” In closing, I just don’t see the purpose in creating a nice app like LO and not have it compete with Word, WP and others! Are you trying to make some sort of statement? It makes no sense to me. I think LO has a lot of good things in it and it is you that is giving it a bad name.

Dr. Larry W. Smith

Competing is not the same as being fully compatible. Also, competing is a too broad word. LibreOffice “competes” with other office suites, in a sense that it offers a tool that can do much of the same, or more; and it is free. Additionally, it offers “new” ways to do that: here is the differences surface. The thing is: there are differences in fundamental model of the document, where LibreOffice project believes that other suites do it in a wrong way, creating billions of unmanageable documents. And of course, doing it in a different way is “incompatible”, while the end result (a document on a “paper”) can look the same. I’m not here to tell you the content of the extensive documentation, so I am just making some sort of a statement. It’s up to you to read the documentation or not; it’s up to you to agree that the goal worth the learning curve or not. The project is not to provide you a clone of any other program; the project is to implement a vision.

Are you trying to substitute your misunderstanding with claims that I make this project a bad name?

2 Likes

Two possibilities: Either you import once by one using the menues. Tedious, but can be done, if you always use the same files.
.
Or YOU have to create a macro (like your current VBA-stuff), wich creates the master-document based on some kind of information you have.
.
But as a first step you should find out, if you can use a master-document with docx-subdocuments. If not there would be command-line conversion to .odp available.
.
But IMHO most of this will not meet your expectations, as you started with

One purpose can be to make things different. As a small example: Star/Open/LibreOffice uses full ICU-regular-expressions instead of the quit limited . Patterns we knew from DOS. Not compatible, but much more powerful. And as the “nice app” always was usable with Linux a good idea for the users there, who were already using regular expressions with their shell.

Thank you and that is nice to know and I will make use of it. Have a great week.

Thanks for the info and I will try your suggestion.

I understand where you are coming from and that is a good thing for those that have the time to participate. I don’t and was hoping LO would solve my master document problem. I started the computer field in 1965 and worked in IT for over 50 years and have seen pretty much of it all and have worked with many different operating system, languages, etc. I have mainly been in QA, testing and building IT best practices. I have done a fair share of marketing working with companies such as Hewlett-Packard and PWC. I am now retired and have left all the in-depth technical stuff behind except I do things in VBA in support of the videos I make with Pinnacle Studio and other tasks. I would love to take the time to master LO and other apps but just don’t have the time. So thanks for sharing your vision with me and I wish you the very best. I will leave one thought with you that has always bothered me but is just a fact in the business world: Who has the biggest market share almost always wins and as I said before I hated it when Microsoft took the place of WP and I despise the company to this day. Have a great week and be safe out there.

Dr. Larry W. Smith

I apologize I forgot to say I applaud OL is free for such a comprehensive product.

Hello again, Mike. I think one of the biggest advantages of LO is the PDF editing capabilities.

Are they as good as Adobe?