user2442768
user2442768

Reputation: 21

scroll google doc with google app script

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

Answers (2)

Hoang TO
Hoang TO

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

Eric Koleda
Eric Koleda

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

Related Questions