title: Extract Text from google doc using google apps script
body: <p>I have a google doc.
  <a href="https://docs.google.com/document/d/1ryvCCj1NCF12RnQx0IyluJmRpW740icoBLIFOJj2juE/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/document/d/1ryvCCj1NCF12RnQx0IyluJmRpW740icoBLIFOJj2juE/edit?usp=sharing</a></p>
  
  <p>and I want to extract the red text part from the doc [red colour is only for reference].
  red part is table and list on 2nd and 3rd page on doc file.</p>
  
  <p>I write the code for table and I easily extract it and paste it in new doc file. But unable to extract the list items from 3rd page.</p>
  
  <pre><code>function test(){
    var sourcedoc = DocumentApp.openById('id');
    var sourcebody = sourcedoc.getBody();
    var tables = sourcebody.getTables();
    var table = tables[0].copy();
    var destdoc = DocumentApp.openById('id');
    var destbody = destdoc.getBody();
    var x = destbody.appendTable(table);
  }
  </code></pre>