Reply
 
Thread Tools Display Modes
  #1   Report Post  
Cheryl B.
 
Posts: n/a
Default Appending word documents - Part 2

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

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wordperfect Office 2000 conversion to Word 2003 MikeE New Users 1 March 21st 05 12:04 AM
copying files from Wordperfect to Microsoft Word Juliet New Users 1 January 31st 05 05:41 PM
In typing dates in Word, i.e. "January 12" how do you keep the "1. Carol Microsoft Word Help 2 January 12th 05 08:09 PM
word xp crashes after macros are recorded kharris0405 Microsoft Word Help 3 January 11th 05 10:50 PM
How to change merge forms from Word Perfect to Microsoft Word dollfindance Microsoft Word Help 2 December 30th 04 03:35 PM


All times are GMT +1. The time now is 01:00 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"