0

I am working on a macro that is supposed to:

  1. Create a copy of the current open spreadsheet
  2. The copy must be in the same folder that the original is in
  3. Open the copy created in a new tab

Nice to have: While running the macro, show a pop-up allowing the user to add to the name of the file, substituting the "(Template)" with the number that the people add.

So far I have the 1 and 2 done, but part 3 and the nice to have I need help.

function NewSheet() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet();
  var destFolder = DriveApp.getFolderById("xxxxx");
  DriveApp.getFileById(sheet.getId()).makeCopy("yyyy (Template)", destFolder);
};

Any insights?

Pᴇʜ
  • 53,845
  • 9
  • 46
  • 68
Pikachu
  • 1
  • 1

0 Answers0