To get the filenames into a document, do something like this.
At the beginning the procedure, add
Dim target as Document
Set target = Documents.Add
Then at the point where you presently have the MsgBox, use
target.Range.InsertAfter [what you now have in the MsgBox command] & vbCr
Then, after the procedure has run, the target document should contain a list
of the files that contain the text.
If you then run a macro containing the following code, it should convert
each (full) filename into a hyperlink.
Dim i As Long, frange As Range
For i = 1 To ActiveDocument.Paragraphs.Count
Set frange = ActiveDocument.Paragraphs(i).Range
frange.End = frange.End - 1
ActiveDocument.Hyperlinks.Add Anchor:=frange, _
Address:=frange.Text
Next i

Signature
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
> Thanks Doug,
>
[quoted text clipped - 15 lines]
>>
>> http://word.mvps.org/FAQs/MacrosVBA/BatchFR.htm
ffn - 19 Feb 2005 09:26 GMT
Hi Doug,
thanks again for very helpful tips. I was wondering if there is a way to
insert the found files (actually if they could be inserted as links as you
suggested, that's best) into a pop-up window rather than a new document.
Cheers.
> To get the filenames into a document, do something like this.
>
[quoted text clipped - 40 lines]
>>>
>>> http://word.mvps.org/FAQs/MacrosVBA/BatchFR.htm
Doug Robbins - 23 Feb 2005 02:41 GMT
I am not sure what you mean by a pop-up window. However, you could populate
a listbox on a userform with the found files and have code in the useform
that would open a document that the user clicked on in that listbox.

Signature
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
> Hi Doug,
>
[quoted text clipped - 49 lines]
>>>>
>>>> http://word.mvps.org/FAQs/MacrosVBA/BatchFR.htm
ffn - 24 Feb 2005 04:11 GMT
Sorry, I may be using incorrect terminology - a userform may be just what
I'm looking for...I'm quite new to VBA (2 1/2 weeks now)!
Basically, I would like the Macro to place the found files in some other
persistent window (form?) that the user can switch between that window/form
and the document he is working on.
In the result window/form, the user can click on any of the found files and
it would open up in Word.
Any files that are found are placed in the result window/form.
I'll try to read up on userforms...do you know of any particular tutorials
that are most relevant to my specifications?
Cheers and thanks.
>I am not sure what you mean by a pop-up window. However, you could
>populate a listbox on a userform with the found files and have code in the
>useform that would open a document that the user clicked on in that
>listbox.
Doug Robbins - 24 Feb 2005 11:07 GMT
See the article "How to create a Userform" at:
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
to get started, but that is only a very simple example of what can be done.
When you find each file, you will use the .AddItem method of the listbox to
add it to a listbox.
You will need to dig into the help in the Visual Basic Editor to get up to
speed with all that you will need. See how you go and post back here when
you get stumped. The best way to learn however is to try and do it
yourself.

Signature
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
> Sorry, I may be using incorrect terminology - a userform may be just what
> I'm looking for...I'm quite new to VBA (2 1/2 weeks now)!
[quoted text clipped - 17 lines]
>>useform that would open a document that the user clicked on in that
>>listbox.