title: Delphi MailMerge Word2010 new page command
body: <p>I am trying to update my membership software written in Delphi, to mailmerge in to Word2010.</p>
  
  <p>I'm using </p>
  
  <pre><code>wrdApp := CreateOleObject('Word.Application');
  wrdDoc := wrdApp.Documents.add();
  </code></pre>
  
  <p>then for each merge field name in a template I'm replacing it with the corresponding field value from a table.</p>
  
  <p>I have successfully done this for single members thanks to a previous answer: <a href="https://stackoverflow.com/questions/6572621/ms-word-2010-mailmerge-in-delphi-5/6580756#6580756">MS Word 2010 mailmerge in Delphi 5</a></p>
  
  <p>However I'm having trouble iterating this code for all members in the table. Ideally I need the template to appear on a new page in the same document with the next members details on.</p>
  
  <p>Currently I can only overwrite the same document for each member, or create a new document each time.</p>
  
  <p>Can anyone advise me how to either recreate the template on the next page, merge multiple documents in to the same one or suggest an alternative method.</p>
  
  <p>many thanks</p>