M
mikewill4
I found this code in an earlier thread, posted by Doug Robbins, to
batch add files to a master document, and I'm getting a syntax error.
Can someone please help? Using Word 2003 SP2.
-------------------------
Dim Source as Document, Target as Document, i as Integer
Set Target = Documents.Add
For i = 1 to 75
Set Source=Documents.Open "[Drive:\Path]" & Format(i, "00") &
".doc"
Target.Range.InsertAfter.Source.Range
Source.Close wdDoNotSaveChanges
Next i
I'm using this line
Set Source = Documents.Open "C:\Documents and Settings\williamsmi\My
Documents\MASSA\PRESS\KIT\" & Format(i, "00") & ".doc"
and getting a Compile error, Expected: End of Statement, with the path
highighted.
THANKS
batch add files to a master document, and I'm getting a syntax error.
Can someone please help? Using Word 2003 SP2.
-------------------------
Dim Source as Document, Target as Document, i as Integer
Set Target = Documents.Add
For i = 1 to 75
Set Source=Documents.Open "[Drive:\Path]" & Format(i, "00") &
".doc"
Target.Range.InsertAfter.Source.Range
Source.Close wdDoNotSaveChanges
Next i
I'm using this line
Set Source = Documents.Open "C:\Documents and Settings\williamsmi\My
Documents\MASSA\PRESS\KIT\" & Format(i, "00") & ".doc"
and getting a Compile error, Expected: End of Statement, with the path
highighted.
THANKS