Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Newbie question on MSWord templates and data
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 |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
Jezebel,
Thanks for the reply. Maybe that's part of my issue, I'm calling something a template that isn't actually a template. Perhaps it's called a form. Anyway, it's a word document with text and fields where you can enter data. And I was hoping there would be an easy way to pull the data elements out of it, perhaps even by name. Sounds like VB may be the best way to go. That and reading the ****! manual, I just gotta find the right one. Thanks again. Sean Jezebel wrote: 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 |
#4
|
|||
|
|||
If it's a form, the data can be identified by the bookmarks that label the
individual fields. wrote in message oups.com... Jezebel, Thanks for the reply. Maybe that's part of my issue, I'm calling something a template that isn't actually a template. Perhaps it's called a form. Anyway, it's a word document with text and fields where you can enter data. And I was hoping there would be an easy way to pull the data elements out of it, perhaps even by name. Sounds like VB may be the best way to go. That and reading the ****! manual, I just gotta find the right one. Thanks again. Sean Jezebel wrote: 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 |
#5
|
|||
|
|||
wrote in message oups.com... Jezebel, Thanks for the reply. Maybe that's part of my issue, I'm calling something a template that isn't actually a template. Perhaps it's called a form. Anyway, it's a word document with text and fields where you can enter data. And I was hoping there would be an easy way to pull the data elements out of it, perhaps even by name. Sounds like VB may be the best way to go. That and reading the ****! manual, I just gotta find the right one. Hi Sean, You need a form. Take a look at this series of articles on forms. It will probably tell you more than you ever wanted to know about them :-) Please Fill Out This Form Create professional-looking forms in Word. http://www.computorcompanion.com/LPMArticle.asp?ID=22 Please Fill Out This Form, Part 2 Adding automation to your Word forms. http://www.computorcompanion.com/LPMArticle.asp?ID=46 Please Fill Out This Form, Part 3 Learn more about VBA macros to automate your form. http://www.computorcompanion.com/LPMArticle.asp?ID=119 Please Fill Out This Form, Part 4 Use custom dialog boxes in your Word forms. http://www.computorcompanion.com/LPMArticle.asp?ID=127 Please Fill Out This Form, Part 5 How to link your Word autoform to a database. http://www.computorcompanion.com/LPMArticle.asp?ID=136 -- Regards Jonathan West - Word MVP www.intelligentdocuments.co.uk Please reply to the newsgroup |
#6
|
|||
|
|||
Thanks! Both of you. Exactly what I was looking for! It's amazing
what knowing the correct word for something will do..... Sean |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Merging Oracle data with Word Templates | Microsoft Word Help |