title: How can I copy file while maintaining formatting?
body: <p>Just to clarify this is a Google Active Script.</p>
  
  <p>Read Google Doc File ( this is a template with place holders and formatting ( bod, tabs, underline etc ) Place holders are <code>{placeholderName}</code> I use <code>Body.replaceText('{placeholderName}', placeholderName)</code> this works fine.  The data that is inserted is contained within a Google Spreadsheet (that works fine too) I am only trying to maintain formatting in the template file that is modified and then appended to the final file. </p>
  
  
  
  <pre class="lang-js prettyprint-override"><code> var SerialLetterID = DriveApp.getFileById('google_doc_id').makeCopy('filename').getId(); 
  </code></pre>
  
  <p>var fBody = DocumentApp.openById(SerialLetterID);</p>
  
  <pre class="lang-js prettyprint-override"><code> // an independent copy of the template ( with formatting )
  var Template = fBody.getBody().copy(); 
  </code></pre>
  
  <p>After the data replaces the placeholders </p>
  
  <pre class="lang-js prettyprint-override"><code>// insert a pageBreak
  fBody.getBody().appendPageBreak();
  
  /* 
   this is where I'm getting the issues.. everything works but the getText()
   removes all formatting.  I looked for a getCopy() or something of the like
   but nothing like that seems to exist.  So, in OOP google style how would I     
   copy the page, maintain formatting in the same manner as getText() works?
  */
  // add template with placeholders 
  fBody.getBody().appendParagraph(Template.getText());
  </code></pre>
  
  <p>I hope that I explained what I'm trying to do.</p>