View Single Post
  #2   Report Post  
Jezebel
 
Posts: n/a
Default

First, what do you mean by 'template' ? In Word, a template is a DOT file
used as the basis for creating documents. Templates don't (normally) contain
data.

Second, assuming you just mean a standard format document, it depends on the
nature of the data you want to extract and how tightly structured the
document is. There is no 'best' method. Eg, if the data is all in tables,
you can open the document in Excel and update your database directly. At the
other extreme you do things like use Find with regular expressions to look
for marker text (Find a paragraph with style = X and text = "Customer", then
find the next instance of "Name: " and retrieve the rest of the paragraph
....)

All of which can be done manually, from VB, from Word VBA, or just about any
other programming method you choose. (Cobol is probably a poor choice.)




wrote in message
oups.com...
Hi all,

I was wondering if anyone can steer me straight on how, or where to
find out how, to extract data from an msword(2000) template. I would
like to eventually get the data into an Oracle database. Once the data
is there, I can do what I want with it, but I'm not sure the best way
to extract it. Would the best way be to use VB? Any information on
getting template data from a document so I can put it in Oracle in a
structured way would be helpful. It looks like Word 2003 can put it to
XML easily, but we have 2000.

Thanks again,

Sean