Group:  Microsoft Word ยป microsoft.public.word.vba.beginners
Thread: FileSearch

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Re: FileSearch
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 03.08.2006 10:57:39
I would expect that you would need to put the individual words into an array
and then iterate through the elements of the array with you search.

Note that the attribute is TextOrProperty (all one word).

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"IA" <iouli.andreev[ at ]chello.at> wrote in message
news:550fd$44d1b9e8$547281f1$32698[ at ]news.chello.at...
[Quoted Text]
>I wrote several macros in Word 95 and 97 which were searching for files
>with
> specific words in the file text, but I cannot convert them into Word 2003
> or
> write new macro in Word 2003 of this type. I cannot insert words for
> search
> into the "text or property" property in the FileSearch object:
>
> With Application.FileSearch
> .NewSearch
> .FileType = msoFileTypeOfficeFiles
> .Text Or Property = ???
> .LookIn = Directory
> .Execute
>
> In a way to search for files which contains several keywords. For
> instance,
> I have to find all files in a directory which contains words "bread",
> "butter" and "pepper".
>
>
> In the early versions of Word Basic it was enough to insert "&" between
> the
> search words, but I do not understand how to make it in Word 2003.
> I tryed to record macro from screen, but Word 2003 display empty window
> after recording such macro. I cannot use earlier version of Word, because
> they cannot open .htm files without frequent crashes.
> I make my life money with searching files in Word, and I am currently in
> the dead end. I am not a programmer, but live forced me to do the simple
> things with macro.
> Please, if somebody has an idea, help me.
>
> Petr Dombrovski, Graz
>
>


FileSearch
"IA" <iouli.andreev[ at ]chello.at> 03.08.2006 15:55:12
I wrote several macros in Word 95 and 97 which were searching for files with
specific words in the file text, but I cannot convert them into Word 2003 or
write new macro in Word 2003 of this type. I cannot insert words for search
into the "text or property" property in the FileSearch object:

With Application.FileSearch
.NewSearch
.FileType = msoFileTypeOfficeFiles
.Text Or Property = ???
.LookIn = Directory
.Execute

In a way to search for files which contains several keywords. For instance,
I have to find all files in a directory which contains words "bread",
"butter" and "pepper".


In the early versions of Word Basic it was enough to insert "&" between the
search words, but I do not understand how to make it in Word 2003.
I tryed to record macro from screen, but Word 2003 display empty window
after recording such macro. I cannot use earlier version of Word, because
they cannot open .htm files without frequent crashes.
I make my life money with searching files in Word, and I am currently in
the dead end. I am not a programmer, but live forced me to do the simple
things with macro.
Please, if somebody has an idea, help me.

Petr Dombrovski, Graz


Re: FileSearch
"IA" <iouli.andreev[ at ]chello.at> 03.08.2006 19:53:27
Yes, but I wonder, why Word 2003 degrade from Word 97? In earlier version it
was possible to use set of words which immediately defined the files which
contains certain words.
This function, by the way, presents in the File->FileSearch option of the
Word 2003, why I cannot use it implemented into the script?

Petr

"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message
news:eIslpuutGHA.4848[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> I would expect that you would need to put the individual words into an
array
> and then iterate through the elements of the array with you search.
>
> Note that the attribute is TextOrProperty (all one word).
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "IA" <iouli.andreev[ at ]chello.at> wrote in message
> news:550fd$44d1b9e8$547281f1$32698[ at ]news.chello.at...
> >I wrote several macros in Word 95 and 97 which were searching for files
> >with
> > specific words in the file text, but I cannot convert them into Word
2003
> > or
> > write new macro in Word 2003 of this type. I cannot insert words for
> > search
> > into the "text or property" property in the FileSearch object:
> >
> > With Application.FileSearch
> > .NewSearch
> > .FileType = msoFileTypeOfficeFiles
> > .Text Or Property = ???
> > .LookIn = Directory
> > .Execute
> >
> > In a way to search for files which contains several keywords. For
> > instance,
> > I have to find all files in a directory which contains words "bread",
> > "butter" and "pepper".
> >
> >
> > In the early versions of Word Basic it was enough to insert "&" between
> > the
> > search words, but I do not understand how to make it in Word 2003.
> > I tryed to record macro from screen, but Word 2003 display empty window
> > after recording such macro. I cannot use earlier version of Word,
because
> > they cannot open .htm files without frequent crashes.
> > I make my life money with searching files in Word, and I am currently
in
> > the dead end. I am not a programmer, but live forced me to do the simple
> > things with macro.
> > Please, if somebody has an idea, help me.
> >
> > Petr Dombrovski, Graz
> >
> >
>
>


Re: FileSearch
"IA" <iouli.andreev[ at ]chello.at> 03.08.2006 21:48:12
I found another crasy thing with word 2003. It is written in the Help to
FileSearch:

"In the Search text box, you enter one or more words. Basic searching
returns files containing these words, whether they are in the body of the
file, in keywords or in other file properties. By entering more words in the
Search text box, you make your search more specific and limit the number of
documents found".

It is totally incorrect. The more words one insert into Search text box, the
more files it produce, because guys in Microsoft are totally irresponsible,
and Microsoft has the monopoly.
The reason of such behavoir of FileSerach is in the conditions OR which
pogrammers implement default in the FileSerch option wothout the
alternative. In case one try to insert two words into the program, it does
not work.
I guessed, which commercial intetrest are hidden in this fact, but I came to
conclusion that it is the banal stupidity.
I have the impression that clever programmers left Microsoft forever.




"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message
news:eIslpuutGHA.4848[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> I would expect that you would need to put the individual words into an
array
> and then iterate through the elements of the array with you search.
>
> Note that the attribute is TextOrProperty (all one word).
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "IA" <iouli.andreev[ at ]chello.at> wrote in message
> news:550fd$44d1b9e8$547281f1$32698[ at ]news.chello.at...
> >I wrote several macros in Word 95 and 97 which were searching for files
> >with
> > specific words in the file text, but I cannot convert them into Word
2003
> > or
> > write new macro in Word 2003 of this type. I cannot insert words for
> > search
> > into the "text or property" property in the FileSearch object:
> >
> > With Application.FileSearch
> > .NewSearch
> > .FileType = msoFileTypeOfficeFiles
> > .Text Or Property = ???
> > .LookIn = Directory
> > .Execute
> >
> > In a way to search for files which contains several keywords. For
> > instance,
> > I have to find all files in a directory which contains words "bread",
> > "butter" and "pepper".
> >
> >
> > In the early versions of Word Basic it was enough to insert "&" between
> > the
> > search words, but I do not understand how to make it in Word 2003.
> > I tryed to record macro from screen, but Word 2003 display empty window
> > after recording such macro. I cannot use earlier version of Word,
because
> > they cannot open .htm files without frequent crashes.
> > I make my life money with searching files in Word, and I am currently
in
> > the dead end. I am not a programmer, but live forced me to do the simple
> > things with macro.
> > Please, if somebody has an idea, help me.
> >
> > Petr Dombrovski, Graz
> >
> >
>
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net