Steven.
... you didn't write it you recorded it... :)
and it could be done a bit simpler.
Sub Insert36()
Dim sFldr as String
Dim i as Integer
If msgbox ("will read from folder " & vba.curdir) < vbOk then exit sub
For i = 1 to 36
Selection.InsertFile FileName:= Format(i,"00")
Next
End Sub
keepITcool
< email : keepitcool chello nl (with @ and .)
< homepage:
http://members.chello.nl/keepitcool
Steven Rosenberg wrote:
I recently wrote a macro which imported 36 files into the
same MSWord document. It worked fine when the day I
wrote it, but today ithe error message "file can't be
found" appears. And now, just as I began writing this,
the Macro began working again. Said Macro is below.
What determines where the macro looks for these files
(which folder/directory?)
Steven
Sub Insert36()
'
' Insert36 Macro
' Macro recorded 7/30/03 by Karen Demelio
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!