Can I color certain words in Google Document using Google Apps Script?

后端 未结 4 2324
余生分开走
余生分开走 2020-11-30 03:44

I\'m trying to highlight certain words in my Google Document. I know I can replace text using document.replace, but it only replaces string itself, not formatting. Is there

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 04:00

    This is available as a Google docs add-on named Multi-instance Text Highlighting. Hints: At first it didn't seem to work, but I closed my doc and re-opened it, and then it worked. Then it didn't seem to work now and then, but I found out that special characters in your text string can break it; I think I had a + in my string and it just didn't do anything. But without special characters, it works great. Really helped me out.

提交回复
热议问题