EDIT : added an answer because edit would have been to long (see answer2)
Following a former post about document merging I ended up with a working script (Thanks Henrique ;) but I still have one small issue : the final 'merged' document contains sometimes blank pages (depending of other docs content) that I would like to remove. I cannot find an easy way to do this. The script goes like this :
function mergeDocs(docIDs) { // parameter docIDs is an array of Doc IDs
var baseDocname = DocumentApp.openById(docIDs[0]).getName();// typical name = IMPRESSION_page_07_07-06-2012__20:57
var modelDoc = DocsList.getFileById(docIDs[0]);
var newmodelName=baseDocname.substr(0,11)+'multipage'+baseDocname.substring(18);
var baseDocId = DocsList.copy(modelDoc,newmodelName).getId();// make a copy of firstelement and give it new basedocname build from the serie(to keep margins etc...)
var baseDoc = DocumentApp.openById(baseDocId)
var body = baseDoc.getActiveSection();
//
for( var i = 0; i < docIDs.length; ++i ) {
var otherCopy = DocumentApp.openById(docIDs[i]).getActiveSection();
var totalElements = otherCopy.getNumChildren();
for( var j = 0; j < totalElements; ++j ) {
var element = otherCopy.getChild(j).copy();
var type = element.getType();
if( type == DocumentApp.ElementType.PARAGRAPH )
body.appendParagraph(element);
else if( type == DocumentApp.ElementType.TABLE )
body.appendTable(element);
else if( type == DocumentApp.ElementType.LIST_ITEM )
body.appendListItem(element);
else
throw new Error("According to the doc this type couldn't appear in the body: "+type);
}
body.appendPageBreak(); // if content length is too short avoids breaking page layout
}
}
The 'PageBreak' causes (sometimes) a blank page , I know that(!), but it is necessary to keep a perfect page layout (I'm printing labels with this doc). here is a link to a typical example