title: How to Control Table Properties
body: <p>I want to correct table indentation using the following condition:<br />
  All tables in the document of <code>Tbl.Rows.LeftIndent = 0.74</code> should be updated to <code>Tbl.Rows.LeftIndent = 0.</code></p>
  <p>The code below generated the following error:</p>
  <blockquote>
  <p>&quot;Object variable or With block variable not set.&quot;</p>
  </blockquote>
  <pre class="lang-vb prettyprint-override"><code>Sub FixEmbeddedTableIndent()
      Dim tbl As Table
      Dim blnFound As Boolean
      With ThisDocument.Range.Find
          tbl.Rows.LeftIndent = 0
          Do
              blnFound = .Execute
              If blnFound Then
                  tbl.Rows.LeftIndent = 0.74
              Else
                  Exit Do
              End If
          Loop
      End With
  End Sub
  </code></pre>
  <p>Note: This condition is needed since there are two types of tables in the document, and the macro should update only one kind of table.</p>