Sometime you may need to merge Google Documents together, when they are just two the task is pretty easy and involves a single copy and paste operation. In some situation where you have multiple documents to merge in a constant recurring way the copy and paste operation could become a tedious task and an huge waste of time.
For this reason I’ve created a Spreadsheet document that, with the help of Google Apps Script, will automate the Google Document merge operation for an unlimited amount of Google Documents.
First of all make a copy of the following Google Spreadsheet document: Merge multiple Google Documents
To merge Google Documents you need the Document ID for each of them. Getting the Document ID is pretty easy, just open the Google Document you want to merge and look at the browser address bar:
The ID of the document is the string between “../d/” and “/edit”, in this example the ID is: “1uWocGqA7Bifl61Vu8-TOWpALDHic8gbc5oCuZivZ1Dg”. All you have to do is to put this ID from cell A5 of the Spreadsheet document:
You can add an unlimited number of document ids, just put them vertically from cell A5. When you have finished inserting all the Document ID to merge run the menu item “Merge Documents -> Merge”:
As result of the execution a new Google Document file will be created inside your Google Drive folder “My Drive”:
Right now this solution doesn’t play nice with images contained inside Google Documents. In the merged document images will result broken. This is a known Google Apps Script bug, you can find more informations here: Google Apps Script Issue: 1612. As soon as Google engineers fix this bug the script should work with images without problems. The only option for you right now, if you need to merge documents that include images, is to “star” the issue 1612 on the issue tracker to speed up the possible resolution.