I think that in the circumstances I might be inclined to create a list of
the folders - the printfolders utility downloadable from my web site will
enable you to grab all the *folder* names eg
D:\My Documents\DISK LABELS
D:\My Documents\DOWNLOAD
D:\My Documents\MAILMESSAGES
D:\My Documents\MONEY
etc
Open the resulting document in Word, then use replace to add the common
filename to the ends of the
entries ie replace
^p
with
\filename.doc^p
(where filename.doc is the name of your file)
to give
D:\My Documents\DISK LABELS\filename.doc
D:\My Documents\DOWNLOAD\filename.doc
D:\My Documents\MAILMESSAGES\filename.doc
D:\My Documents\MONEY\filename.doc
replace the slashes with double slashes ie \ with \\
then add quotes start and finish of each line ie *wildcard* replace
(D*)(^13)
with
"\1"\2
Where D here is the drive letter at the start of each line
You should then have:
"D:\\My Documents\\DISK LABELS\\filename.doc"
"D:\\My Documents\\DOWNLOAD\\filename.doc"
"D:\\My Documents\\MAILMESSAGES\\filename.doc"
"D:\\My Documents\\MONEY\\filename.doc"
etc
Finally run the following macro on the list:
Sub MakeFields()
Dim myRange As Range
Dim FieldText As String
Set myRange = ActiveDocument.Range
With myRange.Find
.Text = """*"""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Do While myRange.Find.Execute
FieldText = (myRange.Text)
ActiveDocument.Fields.Add Range:=myRange, Type:=wdFieldIncludeText,
Text:=FieldText
'move the range past the current field
myRange.MoveEndUntil cset:=""""""
myRange.Collapse wdCollapseEnd
myRange.Select
Loop
End Sub
http://www.gmayor.com/installing_macro.htm
This will produce the following:
{ INCLUDETEXT "D:\\My Documents\\DISK LABELS\\filename.doc" \* MERGEFORMAT }
{ INCLUDETEXT "D:\\My Documents\\DOWNLOAD\\filename.doc" \* MERGEFORMAT }
{ INCLUDETEXT "D:\\My Documents\\MAILMESSAGES\\filename.doc" \*
MERGEFORMAT }
{ INCLUDETEXT "D:\\My Documents\\MONEY\\filename.doc" \* MERGEFORMAT }
which will include all your documents in a single document.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>