makeCopy is not a function (GAS)

130 views
Skip to first unread message

Marcelo Chiapparini

unread,
Apr 27, 2024, 9:21:41 AM4/27/24
to Google Apps Script Community
Hi,

I am new to script programming.
My script below is not running because there is an error in line 34 regarding makeCopy. I can't find the error. Any help will be very appreciated. Thank you!

Cheers,
Marcelo

Formulários.png

Brett Grear

unread,
Apr 28, 2024, 3:42:05 PM4/28/24
to Google Apps Script Community
I don't think makeCopy exists on the Form Class.

You could try something like DriveApp.getFileById(formularioOriginal.getId()).makeCopy(nomePasta, pasta)

The File class does have the makeCopy method.


Marcelo Chiapparini

unread,
Apr 28, 2024, 4:46:39 PM4/28/24
to Google Apps Script Community
Hi Brett!

Thank you very much for your help. You are right, there is no makeCopy in the Form Class (I've consulted the documentation). The solution you sugested do the work very well. Thank you again!

Regards,
Marcelo

Reply all
Reply to author
Forward
0 new messages