I have always used the insertText() function, but now I want to write a link in my google docs. The ideal would be to be able to write in HTML, but I don't know how.. it seems that it is not possible with the insertText() function.
How can I do that ?
I am using this script, this is working Calomun 1 Row > 2.
You should be able to use setFormula and the Hyperlink formula like so:
Edit: Looks like I misread the question. Try this instead:
Edit 2: Looks like
.setLinkUrl()
is effecting the whole body, not the text inserted. If you put the link text into a variable and use the length of the variable to mark the link area, it should work. Try this instead: