0
votes

I want to create a script that would do the followings:

  • create a form
  • once a user fill the form and submit, the script would copy a
    previously created Google Document "template" and fill out the fields the copied template with the information submitted.

Now I am aware that you can not create scripts within the "Document" container (only Spreadsheet and Sites), but can a standalone Google Apps Script read or write directly to Document like the way it could with Spreadsheet?

I read somewhere that Google Apps Script can not read text from a Google Document, but only text and CSV. Is that still true with the recently update to Google Apps Script?

2
After further research, I got a better understand of the Google Apps Scripts platform. Even though Document is not a container for Scripts like Spreadsheet/Sites, you could manipulate documents using Document services (like the answers below indicated). Since Drive was introduced, Scripts can now be created from Drive (without creating Spreadsheet/Sites). - s2000coder

2 Answers

1
votes

Yes, this can be done. The easiest example to follow is Employee of the Week example. This takes in user input , merges it into a doc and automatically emails the result out to the user, which you can remove if you like. There also a video tutorial. Should get you pointed in the right direction.

1
votes