I have created a script that copy template table from one docs to another.
function onOpen() {
var ui = DocumentApp.getUi();
ui.createMenu('Templates')
.addItem('some_items', 'appendTemplate')
.addToUi();
}
function appendTemplate() {
var sourcedoc = DocumentApp.openById("DocID");
var sourcebody = sourcedoc.getBody();
var tables = sourcebody.getTables();
var table = tables[0].copy();
var destdoc = DocumentApp.getActiveDocument();
var destbody = destdoc.getBody();
var x = destbody.appendTable(table)
}
When I exec this script the table correctly copy to target document but dropdown boxes are without default colours.
when I tried to click any of them I got an error "unable to load file".