C
Cheryl B.
Steve's solution (copy/pasted below) worked great ... however, (question 1) I
seem to be getting some duplicate pages. I have 125 individual Word
documents in which the filename starts with 1, 2, 3, etc.. (question 2)Is
there a way to have the files appended in filename order so that the pages
appear in sequence?
Sub Foo()
Dim i As Long
Application.ScreenUpdating = False
Documents.Add
With Application.FileSearch
'Search in foldername
..LookIn = "C:\test"
..SearchSubFolders = False
..FileName = "*.doc"
..Execute
For i = 1 To .FoundFiles.Count
If InStr(.FoundFiles(i), "~") = 0 Then
Selection.InsertFile FileName:=(.FoundFiles(i)), _
ConfirmConversions:=False, Link:=False, Attachment:=False
Selection.InsertBreak Type:=wdPageBreak
End If
Next i
End With
End Sub
seem to be getting some duplicate pages. I have 125 individual Word
documents in which the filename starts with 1, 2, 3, etc.. (question 2)Is
there a way to have the files appended in filename order so that the pages
appear in sequence?
Sub Foo()
Dim i As Long
Application.ScreenUpdating = False
Documents.Add
With Application.FileSearch
'Search in foldername
..LookIn = "C:\test"
..SearchSubFolders = False
..FileName = "*.doc"
..Execute
For i = 1 To .FoundFiles.Count
If InStr(.FoundFiles(i), "~") = 0 Then
Selection.InsertFile FileName:=(.FoundFiles(i)), _
ConfirmConversions:=False, Link:=False, Attachment:=False
Selection.InsertBreak Type:=wdPageBreak
End If
Next i
End With
End Sub