Question

I have a requirement to change the sharing settings on a number of files hosted in Google Docs. I know that I can use DocsList Services with Google Apps Script if I want to add or remove Editors or Viewers from a file using calls like this:

var file = DocsList.createFile("My File", "ABC");
file.addEditor("MyUserName");

What I am looking for is a function that I can call that will allow me to change the overall sharing setting of the file from "Private" to "Anyone with a link". Does such a function exist anywhere? Thanks!

Was it helpful?

Solution

Afraid not. You are welcome to request this as a requested new feature enhancement in the Issue Tracker.

http://code.google.com/p/google-apps-script-issues/issues/list

OTHER TIPS

That is indeed not possible, but there's a somewhat easy workaround. You can always place a document in a folder that is previously shared for "Anyone with a link", then the documents will be shared too. Since a document can be in multiple folders, you can have a folder just for that without messing with your current folder structure.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top