I want to make multiple copies of Google forms.

Asked 1 years ago, Updated 1 years ago, 38 views

There is something I would like you to tell me something.
I was an amateur at all, and I looked into this and that for a few days, but I didn't understand.
If anyone knows, I would like to ask for your help.

As stated in the title, I would like to make multiple copies of Google Forms. I want to make it happen.

As for the spreadsheet, I looked it up and was able to work well with the code below.
I wanted to copy the form in the same way, but I tried and tried, but it didn't work.
Please let me know if anyone knows.

I look forward to your kind cooperation.

----------- A script to copy my spreadsheet -----

function myFunction(){

  for(vari=0;i<3;i++){
   var doc = SpreadsheetApp.openByUrl("This is a URL.");
  // var doc = SpreadsheetApp.getActiveSpreadsheet();
  varfile=DriveApp.getFilesByName(doc.getName());
  varcopy=file.next().makeCopy();
    copy.setName(i+"test copy-copy"); 
  }
}

google-apps-script

2022-09-30 11:22

1 Answers

Use FormApp when working with the form.

vardoc=FormApp.openByUrl("This is a URL.");
varfile=DriveApp.getFileById(doc.getId());
varcopy=file.makeCopy();


2022-09-30 11:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.