Reputation: 21
Is it possible to scroll a google doc using google app script?
I have an app script that searches for all headers in an active doc and creates a table of contents, and now I'd like to link the contents list to the headers as they occur in the doc itself.
I've made this work using jquery in the mozilla rich text editor and it's very handy.
Thanks.
Upvotes: 2
Views: 1632
Reputation: 61
It is possible now with setSelection() method
https://developers.google.com/apps-script/reference/document/document#setselectionrange
There is also NamedRange entity that we can create on a document for later retrieval
Upvotes: 1
Reputation: 12673
No, unfortunately it's not currently possible to control the scroll or cursor position within a document. See our support page for information on how to file feature requests: https://developers.google.com/apps-script/support
Upvotes: 0