Hello,

I have a word document (for example, Iâ??ll call it â??Article.docâ??) which is
rather large, containing certain news articles.

I wish to do a search/find and identify specific key words in â??Article.docâ??.
However, the list of possible words in â??Article.docâ?? that I wish to find (if
they are there), number about 500.

I have this list of words that I want to be found stored in a separate
document that is always being updated/changed. (For example, Iâ??ll call this
document â??List.docâ??)

I do not want to have to go and use the Find Feature built-in to MS Word and
copy/paste all 500 words individually and search â??Article.docâ?? to see if they
are present.

So I was curious, is there a way I can get MS Word to take/store the list of
words in â??List.docâ?? and then go through â??Article.docâ?? and find any instances
of any of the words from the â??List.docâ??.
If possible I would like to also go one step further, and not only find
instances of any of the 500 words in the â??Article.docâ??, but to also highlight
them in yellow.

If you have any help or suggestions, I would greatly appreciate it :-D

Thankyou kindly for you time,

Kind Regards
KJ

RE: Search for specific words in a document using an external list? by AnandVVN

AnandVVN
Thu Sep 29 23:06:03 CDT 2005

Hi,

this is possible. I am not sure of the code, but I think this is what you
have to do.
In the macro , open both the files

Start a loop i.e. a for loop which would pick out the words from the
list.doc word by word, you can store it in a variable in the second for loop
find the word usign the find.execute, if the text is found, you can I guess
there is a way to highlight.

In the list.doc the words are stored one word per line or they stored as
comma sperated. If it is one word per sentence, the loop would simple, but if
it is a comm septated file, I guess you would have to check for comma.



Hope you found this helpful
Anand
--
"Who will guard the guards?"


"Krazykaj" wrote:

> Hello,
>
> I have a word document (for example, Iâ??ll call it â??Article.docâ??) which is
> rather large, containing certain news articles.
>
> I wish to do a search/find and identify specific key words in â??Article.docâ??.
> However, the list of possible words in â??Article.docâ?? that I wish to find (if
> they are there), number about 500.
>
> I have this list of words that I want to be found stored in a separate
> document that is always being updated/changed. (For example, Iâ??ll call this
> document â??List.docâ??)
>
> I do not want to have to go and use the Find Feature built-in to MS Word and
> copy/paste all 500 words individually and search â??Article.docâ?? to see if they
> are present.
>
> So I was curious, is there a way I can get MS Word to take/store the list of
> words in â??List.docâ?? and then go through â??Article.docâ?? and find any instances
> of any of the words from the â??List.docâ??.
> If possible I would like to also go one step further, and not only find
> instances of any of the 500 words in the â??Article.docâ??, but to also highlight
> them in yellow.
>
> If you have any help or suggestions, I would greatly appreciate it :-D
>
> Thankyou kindly for you time,
>
> Kind Regards
> KJ

RE: Search for specific words in a document using an external list by Krazykaj

Krazykaj
Thu Sep 29 23:14:01 CDT 2005

Hello,

Thankyou for the response :-D

I will have a go at what you suggest,
One thing that i may mention though is that i just came accross this thread
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.word.vba.general&mid=9472d73a-65b2-4d07-8c65-83cdd7f789b2&sloc=en-us

So i will have a go at what is suggested there as well and see what happens
:-)

thankyou again,

Cheers
KJ

"Anand.V.V.N" wrote:

> Hi,
>
> this is possible. I am not sure of the code, but I think this is what you
> have to do.
> In the macro , open both the files
>
> Start a loop i.e. a for loop which would pick out the words from the
> list.doc word by word, you can store it in a variable in the second for loop
> find the word usign the find.execute, if the text is found, you can I guess
> there is a way to highlight.
>
> In the list.doc the words are stored one word per line or they stored as
> comma sperated. If it is one word per sentence, the loop would simple, but if
> it is a comm septated file, I guess you would have to check for comma.
>
>
>
> Hope you found this helpful
> Anand
> --
> "Who will guard the guards?"

RE: Search for specific words in a document using an external list by AnandVVN

AnandVVN
Fri Sep 30 23:13:02 CDT 2005

Hi,

I checked the thread too.
Looks promising, All the best, let me know what happened.

Anand

--
"Who will guard the guards?"


"Krazykaj" wrote:

> Hello,
>
> Thankyou for the response :-D
>
> I will have a go at what you suggest,
> One thing that i may mention though is that i just came accross this thread:
> http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.word.vba.general&mid=9472d73a-65b2-4d07-8c65-83cdd7f789b2&sloc=en-us
>
> So i will have a go at what is suggested there as well and see what happens
> :-)
>
> thankyou again,
>
> Cheers
> KJ
>
> "Anand.V.V.N" wrote:
>
> > Hi,
> >
> > this is possible. I am not sure of the code, but I think this is what you
> > have to do.
> > In the macro , open both the files
> >
> > Start a loop i.e. a for loop which would pick out the words from the
> > list.doc word by word, you can store it in a variable in the second for loop
> > find the word usign the find.execute, if the text is found, you can I guess
> > there is a way to highlight.
> >
> > In the list.doc the words are stored one word per line or they stored as
> > comma sperated. If it is one word per sentence, the loop would simple, but if
> > it is a comm septated file, I guess you would have to check for comma.
> >
> >
> >
> > Hope you found this helpful
> > Anand
> > --
> > "Who will guard the guards?"