read a directory of word (2000) documents into a db

  • Thread starter Thread starter gabe
  • Start date Start date
G

gabe

I have a directory of word docs (maybe 2 or 3 hundred),
all of the docs are
based on a custom template and they have 20 or so fields,
I would like to
read all of the fields into a db. Any help would be
appreciated.

gabe
 
Well, without actually writing the code, the general direction is this.

1.) Add a reference to the word COM see references in Solution explorer
2.) Write some code, here is a very simple snipit
Dim wrd As New Word.ApplicationClass

Dim doc As New Word.DocumentClass

doc = wrd.Documents.Open("c:\test.doc")

MessageBox.Show(doc.Name)

doc.Close()

3.) Then store the retrieved data in a DataTable for example.



OHM#









I have a directory of word docs (maybe 2 or 3 hundred),
all of the docs are
based on a custom template and they have 20 or so fields,
I would like to
read all of the fields into a db. Any help would be
appreciated.

gabe

Regards - OHM# (e-mail address removed)
 
More specifically Im looking for a feild object. There is
a bunch of info in the docs that I don't want - I just
need the feilds. Thank-you again in advance.

gabe
 
Yes, I know and realise this. However, if you do what I suggested you can
view the word Application classes using the object browser. I noticed Fields
was one of the properties. However, as I dont know the words objects very
well, for brevity I decided to just call the name property to prove I had
gotten the document.

Surely you can take it from here ?

Regards - OHM


More specifically Im looking for a feild object. There is
a bunch of info in the docs that I don't want - I just
need the feilds. Thank-you again in advance.

gabe

Regards - OHM# OneHandedMan{at}BTInternet{dot}com
 
Back
Top