inserting filenames in concatenate-files macro
It will be easier to tell you how to go about this if you post the code that
you already have do the insertion of the files.
Thank you. It's copied below:
Public sBoilerFolder As String
Sub StartBoiler()
' Version 8 - 15 November 2007
' Macro originally created 05/01/97 by Woody Leonhard
' with modifications by Graham Mayor 2006 & 2007
' and by Greg Maxey 2007
Dim fDialog As FileDialog
Dim i As Long
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select Folder containing the documents to be inserted
and click OK"
.AllowMultiSelect = False
If .Show -1 Then
Exit Sub
End If
End With
start:
On Error GoTo error
If Left(sBoilerFolder, 1) = Chr(34) Then
sBoilerFolder = Mid(sBoilerFolder, 2, Len(sBoilerFolder) - 2)
End If
frmBoilerMain.Show
Exit Sub
error:
If Err = 4248 Then
Documents.Add
GoTo start
End If
End Sub
|