Click to See Complete Forum and Search --> : Serching a string in Word Document opened through VB application


srikanth s
April 5th, 1999, 03:11 PM
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?

Lothar Haensler
April 6th, 1999, 09:28 AM
(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.

aazin
November 21st, 2001, 05:15 PM
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

Cimperiali
November 23rd, 2001, 05:20 AM
...as a new question. Lothar is no more in CodeGuru since he went to work in Singapore...

Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.

The Rater