Lab5, due Tuesday, Feb 21

You are performing market analysis on a Word document to examine how often certain words occur in the document.

In a textfile (.txt) you find the words that you are concerned with. There is one word per line in any such file. There are at most 50 words. Search a Word doc (.doc) for the number of times each word occurs and create and display a histogram for the words in one MsgBox.

Sample data (in the text file):
dance
heart
love

Sample data (in the word doc):
One Heart - Celine Dion
Dance With Me - Jennifer Lopez
You Belong To My Heart - Elvis Presley
Shot Through The Heart - Bon Jovi
Love By Another Name - Celine Dion
Piece Of My Heart - Faith Hill
Do You Wanna Dance? - Johnny Rivers
Love Changes Everything - Michael Ball
One Heart Too Many - Justin Guarini
Love Comes Without Warning - America
Quit Playing Games With My Heart - Backstreet Boys

For the sample data, your program produces the following results (in a MsgBox):
dance:
    * *
heart:
    * * * * * *
love:
    * * *


Assignment Notes

-- To solve this, you should only need two arrays, one to hold the words and another to hold the histogram values (counts of how many times the words occur). For the above data, the words array holds
    dance     heart     love
The corresponding histogram array holds
      2         6         3

-- You will use the subroutine "fillArray" from linearSearch.vbs to fill the words array. The code in searchWord.vbs should help with searching the Word document. I found the "printOneArray" routine helpful to check the arrays as I coded.

-- You must use subroutines or functions for your computing. The code found at the top of the program should be declarations, but computation should be done in subprograms. Think about tasks. Describe the solution to the problem in English. I used subroutines or functions to fill the words array, initialize the array for the histogram, to fill the histogram array, and then I passed everything to a routine to do the MsgBox display.

-- The data in the sample data files is different (a lot longer) than the sample data shown here. And the data I will run your programs with may be different from both sets of data.

-- Recall that VBNewLine gets you to the next line of output in a MsgBox.