title: Setting word table border from Excel VBA
body: <p>I am having trying to set border of word table from Excel VBA. Many sites suggest the following:</p>
  
  <pre><code>wrdTable.Borders(wdBorderTop).LineStyle = wdLineStyleSingle
  </code></pre>
  
  <p>but I get an error (The requested member of the collection does not exist) while trying it. However, I could bring inner borders using following code:</p>
  
  <pre><code>wrdTable.Borders(xlDiagonalUp).LineStyle = xlContinuous
  </code></pre>
  
  <p>Similarly I tried:</p>
  
  <pre><code>wrdTable.Borders(xlEdgeTop).LineStyle = xlContinuous
  </code></pre>
  
  <p>to bring top borders, but I get diagonal lines. How could I apply borders (inner and outside borders) in my word tables? I am using office 2007.</p>