From my answer to Move to last line of Google Document when it is opened
var doc = DocumentApp.getActiveDocument();
var body = doc.getBody();
var numChildren = body.getNumChildren();
var pos = doc.newPosition(body.getChild(numChildren - 1),0);
I am using a Mac with a magic wireless keyboard (without an end key). There doesn't seem to be a keyboard shortcut for this.
I have documents that I often need to jump straight to the end of after loading them. My workaround is as follows:
Add a piece of text at the very end of the document, such as "END OF DOCUMENT".
Select the text, go to the insert menu,...
Normal spaces can be underlined as long as there is a non-space character to the right of them. I abused this fact by letting the line end with a single, random letter with white color so that it wont be visible.
That did the trick nicely.
I had the same issue and tried to solve it with Vidar's answer but because of deprecation it didn't work.
The actual solution is the link by @hadi in the comment on Vidar's answer.
This is a great answer. I cleaned it up, and updated some of the deprecated methods, and got rid of unnecessary functions, and also modified it to be run from ...