title: Parse word document in VBScript
body: <p>I got a weird mission from a friend, to parse through a bunch of Word files and write certain parts of them to a text file for further processing.</p>
  
  <p>VBscript is not my cup of tea so I'm not sure how to fit the pieces together.</p>
  
  <p>The documents look like this:</p>
  
  <pre><code>Header
  A lot of not interesting text
  Table
  Header
  More boring text
  Table
  </code></pre>
  
  <p>I want to parse the documents and get all the headers and table of contents out of it. I'm stepping step through the document with</p>
  
  <pre><code>For Each wPara In wd.ActiveDocument.Paragraphs
  </code></pre>
  
  <p>And I think I know how to get the headers</p>
  
  <pre><code>If Left(wPara.Range.Style, Len("Heading")) = "Heading" Then
  </code></pre>
  
  <p>But I'm unsure of how to do the </p>
  
  <pre><code>Else if .. this paragraph belongs to a table..
  </code></pre>
  
  <p>So, any hint on how I could determine if a paragraph is part of a table or not would be nice. </p>