Serching a string in Word Document opened through VB application
Hi friends,
I am developing a HRD package in VB. I am getting MS Word 97 documents as input. I have to serach for some key words like skills or qualifications something like that in the document and log them if I found those key words in the document. I couldn't get any idea how to go about it. Anybody is there to help me out?
Re: Serching a string in Word Document opened through VB application
(OLE) automation is the way to go to trigger another application like Word to accomplish a certain task. You manipulate the object model of the other application through VB code.
Word comes with a type library that you can add to the references of your vb application.
Check out the object browser (F2) to see what objects and methods are exposed.
I suggest you record a macro in Word to see what type of commands you need to specify to do your search operation.
Re: Serching a string in Word Document opened through VB application
Hi.
I am very new to VB for Application. And I am not familiar with OLE. I wrote a program to open a .txt version of the .doc and grab a string and append it to an output file. But I want to enchance this...
1. Automate it.
2. Open the .doc file instead of .txt. - eliminate one step
The following did not work for me (Open "TESTFILE" For Binary Access Read Lock Read As #1)
3. Place the string and the filename it came from into an Access table. (I know a bit of SQL- a sample VB
code will be appreciated)
Any Help Is appreciated,
Angela