Apps Script to Make a Copy of a Google Document -
just trying make simple script makes copy of doc specified file id , opens copy.
the following script makes copy doesn't open document:
function doget(e) { var fileid = e.parameters.fileid; if(!fileid){ //fileid = google doc id fileid = '1eenxjdeka0p3xeq6xdm0r2wacc6snp5_7hu3_f4viaa'; } var newid = docslist.getfilebyid(fileid).makecopy('file copied drive').getid(); documentapp.openbyid(newid); }
can't figure out why. appreciated. thanks.
"opening document" using google-apps-script not mean "open in browser", gives access document using google docslist method, nothing else.
the best achieve looking fo throw popup window showing new file url click open (using anchor widget uiapp service or small html ui).
this built in limitation of g-a-s , there no way go around it.
Comments
Post a Comment