Trouble accessing Footnotes class Google Scripts -
i'm trying write simple script take footnote added google document , copy endnotes section. so, user use footnotes normal , run script shift them end of document when they're finished.
i've got script returns array containing [footnote, footnote]
test doc 2 included, cannot figure out how convert object string.
function getnotes() { var doc = documentapp.getactivedocument().getfootnotes(); logger.log(doc); }
i've pored on documentation, , i'm confused because can't seem find getfootnotecontents
method mentioned in footnotes
class. direction appreciated.
getfootnotes() return array of footnote objects. need iterate on them access each one.
function getfootnotes(){ var doc = documentapp.openbyid('...'); var footnotes = doc.getfootnotes(); for(var in footnotes ){ logger.log(footnotes[i].getfootnotecontents().gettext()); } }
Comments
Post a Comment