An index is an alphabetically arranged list of words or records anchored with certain clues like page numbers and record numbers. We come across many types of indices in day-to-day life such as data-base indices and topic indices in books.

The index may thus be viewed as a handy tool to represent huge amount of information in a page or pages. Preparing the index for the book of several hundred pages is really a pains taking and laborious work for authors and publishers. However, the program presented in this article helps to prepare such an index for the Word documents.

Enter the word to find in a Word docuŽment file, and the program searches the word through the entire document and lists the word along with the page numbers where the word is located. The program opens Microsoft Word applicaŽtion in Visual Basic environment.

Name:  Book Index in Visual.jpg
Views: 57
Size:  53.9 KB

The program is based on a single form and simple code. You can search words using options 'match case: 'match whole word: or both, or ignore both of them .es shown in Screenshot 1. Using this program, you can open any Word document from a folder in your system as shown in Screenshot 2. Once the Word document is found, click the document file. The document will open in a sepa'rjte window. Then you can type-the word that you want to find from the document file and tick 'match pase' option. When you click 'Find' button; the words found wjll be listed along with the page numbers in the text-box provided at the bottom of the screen as shown in Screenshot 3.

You can repeat the procedure for different words. Remember that you need not open the document again and again for each word unless you require another document. The program is developed and tested in VB6 integrated development environment, Windows XP and MS-Office 2003.