step by step,
open a file,
loop
extract some data
manage errors
paste into word
end loop
I'm not familiar with word vba, but this should let you open a file and get at some data
fileName = fileArray(myMonth, 3) myPath = fileArray(myMonth, 4)
myString = myPath & "/" & fileName
If BookOpen(fileName) = True Then Workbooks(fileName).Close SaveChanges:=True
If Dir(myString) <> "" Then 'workbook name exists at location
Set dataWB = Workbooks.Open(fileName:=myString)
Else
myWB.Worksheets("Admin").Cells(myMonth + 6, 4).Value = "File Missing"
End If
DoEvents 'ensure file opens fully before continuing
and to manage file locations
Sub GetFilePath(myRow As Long)'Return file name and path to worksheet cells
Dim myObject As Object
Dim fileSelected As String
Dim myPath As String
Dim myFile As String
Dim strLen As Integer
Set myObject = Application.FileDialog(msoFileDialogOpen)
With myObject
.Title = "Choose File"
.AllowMultiSelect = False
If .Show <> -1 Then Exit Sub
fileSelected = .SelectedItems(1)
End With
strLen = Len(fileSelected) - InStrRev(fileSelected, "\")
myFile = Right(fileSelected, strLen)
strLen = Len(fileSelected) - strLen - 1
myPath = Left(fileSelected, strLen)
With Worksheets("Admin")
.Range("G" & myRow) = myPath 'The file path
.Range("F" & myRow) = myFile 'The file name
.Range("C" & myRow, "D" & myRow).Font.Color = vbBlack
If Len(myFile) > 0 Then
.Range("D" & myRow).Value = "File Located"
Else
.Range("D" & myRow).Value = "No File"
End If
End With
End Sub