I have a template file in Google Docs. This template is to be copied and the newly created document presented to the user for editing in the browser.
I have a webapp where the user clicks a button and that runs the following code:
var theTemplate = DriveApp.getFileById('[ID_of_the_template');
var theDocument=theTemplate.makeCopy("copy_for_me");
var num=theDocument.getId();
Logger.log(num);
This makes the copy and then in the variable "num" I have the document ID I need and all I now need is to open a link to https://docs.google.com/document/d/[docuID_here]/edit but I can find no way to do so.
I am sure this is easy but I can not find how to do it. Maybe I am thinking too complicated or am on the wrong track. As always I appreciate any and all help.
Greetings from the Bavarian Alps.