View Single Post
  #3   Report Post  
Posted to microsoft.public.word.newusers
levydav levydav is offline
external usenet poster
 
Posts: 1
Default searching for multiple alternative string in MS Word?

Yes, I want to include this function in a macro. I have written macros
that employ MS Word's wildcard search, but I don't know how to compare
part of a found string with a separate list of words. I would be
search for words without punctuation before "which"--e.g., "([A-z]@)
which"

Thanks for your help,



On Aug 24, 12:59*pm, Jay Freedman wrote:
On Sun, 24 Aug 2008 11:56:53 -0400, "David" wrote:
I want to search for all occurrences of "which" in a document thatare not
preceeded by prepositions. Is there any way to accurately do this with MS
Word's wildcard search?


Thanks


Not with wildcards -- there is no wildcard for "preposition".

It would be possible to write a macro that finds each occurrence of "which" and
compares the preceding word to a list of all prepositions (such as that inhttp://en.wikipedia.org/wiki/List_of_English_prepositions).

What do you want to do after you find an occurrence? Also, does it make any
difference if there is punctuation between the occurrence and the preceding
word? Should the search be case-sensitive? Questions such as these should be
answered before starting to design the macro.

--
Regards,
Jay Freedman
Microsoft Word MVP * * * *FAQ:http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.