title: deleting certain lines in ms word 2007
body: <p><img src="https://i.stack.imgur.com/hPXmL.jpg" alt="enter image description here">I would like to delete certain lines from my word document using a VBA macro. Basically the (block of) text to be deleted (and replaced by "***") follows a certain pattern (below). </p>
  
  <pre><code>Bottom of Form
  perma-link
  
  Top of Form
  save
  Bottom of Form
  [+] ....
  [–] ....
  Top of Form
  </code></pre>
  
  <p>"...." represents text that changes every block, but for sure the line starts with "[+]" or "[-]".</p>
  
  <p>Please suggest a suitable macro</p>
  
  <p>EDIT: In the screenshot, I would like to keep the text in yellow and delete the rest. (in the actual file, the text isn't in yellow)</p>
  
  <p>PS-FYI, I tried using the example <a href="https://stackoverflow.com/questions/6398227/looping-a-find-and-delete-row-macro">looping a find and delete row macro</a> (for line by line deletion) but i get a runtime error 5941 with debugging option highlighting the line "selection.row.delete" in the macro.</p>
  
  <p>What does this mean?</p>