title: Using vba to automate a Microsoft Word document with data imported from an Excel sheet, using a variable to filter what data to actually insert
body: <p>I'm trying to populate a Word document with information from Excel. The table on excel looks really simple.</p>
  
  <pre><code>  QUESTION              |YES|  DATA
  
   Prewritten question 1  | X | Prewritten data 1
  
   Prewritten question 2  | X | Prewritten data 2
  
   Prewritten question 3  | X | Prewritten data 3
  </code></pre>
  
  <p>How would I then automate populating a new word document with the data with the variable X under YES, only pasting the prewritten data held in the data column?</p>
  
  <p>I almost got this working on Word just using the step by step mail merger feature , but while I was able to populate the Word document, the Prewritten data would paste, but each pasted selection from the data column would take its own page on Word, even if it was a short 3 word phrase.</p>