Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Importing multiple rtf files
Hello
I have over 100 rtf files, each about 25 pages in length. Is there a way to import all 100 files into a single Word document, without having to import each individually? I thought about developing a macro, but don't know how to specify the files or fodler name. Thanks. |
#2
|
|||
|
|||
Try this:
Dim MyPath As String Dim MyFile As String Dim Source As Document, Target As Document With Dialogs(wdDialogCopyFile) If .Display() -1 Then Exit Sub MyPath = .Directory End With If Len(MyPath) = 0 Then Exit Sub If Asc(MyPath) = 34 Then MyPath = Mid$(MyPath, 2, Len(MyPath) - 2) End If MyFile = Dir$(MyPath & "*.rtf") Set Target = Documents.Add While MyName "" Set Source = Documents.Open(MyPath & myFile) Target.Range.InsertAfter Source.Range Source.Close wdDoNotSaveChanges MyName = Dir Wend -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Lawrence" wrote in message ... Hello I have over 100 rtf files, each about 25 pages in length. Is there a way to import all 100 files into a single Word document, without having to import each individually? I thought about developing a macro, but don't know how to specify the files or fodler name. Thanks. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I open multiple Word 2003 files to display on dual monitors | Microsoft Word Help | |||
Working on multiple word files from a single file???? | New Users | |||
How can you merge data from multiple source files? | Mailmerge | |||
Table of Contents - Multiple Files | Microsoft Word Help | |||
How can I insert multiple files at once into a document? | Microsoft Word Help |