0

How to open a newly created google word document in another browser instance so that the user can interact with it.

I don't find any methods in the Document or the DocumentApp classes tailored for this requirement?

var doc = DocumentApp.create('My journal entry');
//now what if I want to open it for user editing?!!!
deostroll
  • 11,661
  • 21
  • 90
  • 161
  • If you give more information about the context in which you create your document ( webapp, spreadsheet...? ) I could give a more developed example... – Serge insas Aug 25 '13 at 10:16
  • 1
    Key here is to create an anchor element (hyperlink) that uses the `getURL()` result. See this answer: http://webapps.stackexchange.com/a/47649/29140 – Jacob Jan Tuinstra Aug 26 '13 at 05:16

1 Answers1

1

The DocsList service has a getUrl() method that you can use to get the url of your doc and use it in a UI to allow user to open it in a new Browser window.

You can find an example of such a Ui in this post

From the example you show you must at first get the ID of your document using getId() and then use DocsList to retrieve the file.

Community
  • 1
  • 1
Serge insas
  • 45,904
  • 7
  • 105
  • 131