user1598395
user1598395

Reputation: 1

Error with using makeCopy() method in DocsList class (in google apps script)

I'm trying to copy a file (Google presentation) in the Google drive using the app script (see below). However, when I execute the small script, the following message pops ups:

File Pres123 New must be converted to a Google document first. (line 3)

Does someone has a hint for me regarding what I'm doing wrong?

function myFunction() { <br>
  var blafile = DocsList.getFileById("11lyU7q7TjPl89Ryjl_rU9YAZnGBCfSiRyxWlZfvOF-E"); <br>
  var newfile = blafile.makeCopy(); <br>
}

Upvotes: 0

Views: 471

Answers (1)

Henrique G. Abreu
Henrique G. Abreu

Reputation: 17772

This is a known issue, copying files only work for Documents and Spreadsheets. You should star the issue to keep track of updates and kind of vote for it.

Upvotes: 1

Related Questions