google apps script - HeaderSection copy to new document -




in google apps scripts, i'm trying copy headersection new document in it's entirety (so can replace name text name)

so used:

var thedoc = documentapp.openbyid('idnumber'); var theprotoheader = thedoc.getheader().copy(); thedoc.saveandclose();  thedoc = documentapp.openbyid(thedocid); if (! thedoc.getheader()) {   thedoc.addheader(); } var thenewheader = thedoc.getheader().clear();    thenewheader = theprotoheader; 

but no success last line ... ideas?





wiki

Comments

Popular posts from this blog

firebase - How to wait value in Ionic 2 -

Jenkins: find build number for git commit -

ROS vtk and kubuntu problems -