title: Parse a word document into an excel file
body: <p>I have a word document that has data that I would like to parse into an excel file.  The source files are hundreds of pages long.  I have been working with VBA, but I just started learning the language and have run into lots of difficulties with trying to input a .doc file.  I have been able to use the <strong>Open</strong> and the <strong>Line Input</strong> statement to retrieve from a .txt file but only gibberish when I try the .doc file.  </p>
  
  <p>I have included two links of screen shots.</p>
  
  <p>The first is a screenshot of a sample of my input data.<br>
  <a href="http://img717.imageshack.us/i/input.jpg/" rel="nofollow">http://img717.imageshack.us/i/input.jpg/</a></p>
  
  <p>The second is a screenshot of my desired output.<br>
  <a href="http://img3.imageshack.us/i/outputg.jpg/" rel="nofollow">http://img3.imageshack.us/i/outputg.jpg/</a></p>
  
  <p>I have developed an algorithm of what I want to accomplish.  I am just having difficulties coding.  Below is the pseudocode that I have developed.  </p>
  
  <pre><code>    Variables:
           string     line = blank
           series_title = blank
           folder_title = blank
  
           int  series_number = 0
                box_number = 0
                folder_number = 0
                year = 0
      do while the &lt;end_of_document&gt; has not been reached
          input line
          If the first word in the line is “series” 
              store &lt;series_number&gt;
              store the string after “:”into the &lt;series_title&gt;
          end if
          call parse_box(rest of line)
          output &lt; series_number &gt; &lt;series_title&gt; &lt; box_number &gt; &lt; folder_number &gt;&lt;folder_title&gt; &lt;year&gt;
      end do while
  
      function parse_box(current line)
          If the first word in the line is “box” 
              store &lt;box_number&gt;
          end if
          call parse_folder(rest of line)
      end function
  
      function parse_folder(current line)
          If first word is “Folder”
              store &lt;folder_number&gt;
          end if
          call parse_folder_title(rest of line)
      end function
  
      function parse_folder_title_and_year(current line)
          string temp_folder_title
          store everything as &lt;temp_folder_title&gt; until end of line
          if last word in &lt;temp_folder_title&gt; is a year
              store &lt;year&gt;
          end if
          if &lt; temp_folder_title&gt; is empty/blank
              //use &lt;folder_title&gt; from before
          else
              &lt;folder_title&gt; is &lt; temp_folder_title&gt; minus &lt;year&gt;
          end if
      end parse_folder_title_and_year
  </code></pre>
  
  <p>Thanks ahead of time for all your help and suggestions</p>