title: Updating/creating Table of Contents in Word using VBA
body: <p>I'm new to VBA. I'm trying to update the Table of Contents in my Word document everytime I open the document, but it does not seem to update it at all.</p>
  
  <p>In <code>ThisDocument</code> I've done the following:</p>
  
  <pre><code>Private Sub Document_Open()
  ActiveDocument.TablesOfContents(1).Update
  End Sub
  </code></pre>
  
  <p>Can anyone help me?</p>