I want to achieve a bookmarking behavior like the example below using a custom script.
Selecting all table cells from the table:
Select a table cell:
Selecting table column from bottom to top:
CodePudding user response:
This is what worked for me:
function myFunction() {
var doc = DocumentApp.getActiveDocument();
var selection = doc.getSelection().getRangeElements();
var pos = selection[0].getElement();
doc.addBookmark(doc.newPosition(pos,0));
}
Screenshots: