Home>

I'm writing code for use with Google Docs in Google Apps Script.

I want to select a text and then execute it to get the selected text and perform an operation on the obtained text.

For example, make it bold, but Google Dev has the following description.

setBold (boolean)

But I don't know what class of code this is.
I think it's a Text object to see where the reference is, but as I mentioned earlier, I want to use it for selected text.

I was able to get the selected text, but I couldn't find anything that looked like setBold () on autocomplete.

How can I get the object?

  • Answer # 1

    Isn't this the script you really want to achieve?
    https://developers.google.com/apps-script/reference/document/range

Related articles