How to set Pageless Google Document via Script?

Viewed 128

Recently Google added this cool feature: Pageless Docs. I would like to activate it on all my documents.

However I cannot find the Property/Method to activate it. The code should be something like:

  var files = DriveApp.getFilesByType("application/vnd.google-apps.document");

  while (files.hasNext()) {
    var file = files.next();
    var doc = DocumentApp.openByUrl(file.getUrl());
    var body = doc.getBody();
    // set documet as Pageless ¿?
    doc.saveAndClose();
  }
}
1 Answers
Related