title: How to find a Word in a Document and insert a url
body: <p>How can I insert a hyperlink on a particular word in a google-drive document?</p>
  
  <p>I can find the word. After that, I want to assign a hyperlink. I used this code:</p>
  
  <pre><code>doc.editAsText().findText("mot").setLinkUrl("https://developers.google.com/apps-script/class_text");
  </code></pre>
  
  <p>My doc is DocumentApp, and this works when done using the UI. However, the code above does not work. How can I perform this task?</p>