Hello All,
I have about 700 word documents that have 2 tables one is static
4 colums x 5 rows the other is 5 colums x rows ranging from 2 to 100
what i wolud like to do is open the word doc.
import the first word table then import the second word table close
word doc
open next word doc and repeat process.
i am able to import one set of data currently into an excel spread
sheet
but how can i loop through all the documents and import them all into
one access table?
the below code works only on one doc and is designed for excell
my current code looks like this
Sub Listfiles()
'Open "F:\ACI-03-0760.DOC" For Input As #1
R = 1
Cells(R, 1) = "Quote Name"
Cells(R, 2) = "To"
Cells(R, 3) = "Contact"
Cells(R, 4) = "From"
Cells(R, 5) = "Fax"
Cells(R, 6) = "Date"
Cells(R, 7) = "sales Rep"
Range("a1:z1").Font.Bold = True
R = R + 1
Cells(R, 2) = (Documents(1).Tables(1).Rows(1).Cells(2)) 'customer name
Cells(R, 3) = (Documents(1).Tables(1).Rows(4).Cells(2)) 'customer
contact
Cells(R, 4) = (Documents(1).Tables(1).Rows(1).Cells(4)) 'from
Cells(R, 5) = (Documents(1).Tables(1).Rows(2).Cells(2)) 'fax number
Cells(R, 6) = (Documents(1).Tables(1).Rows(3).Cells(4)) ' date
Cells(R, 7) = (Documents(1).Tables(1).Rows(4).Cells(4)) ' Sales rep
R = R + 2
Cells(R, 2) = (Documents(1).Tables(2).Rows(2).Cells(1)) ' Item Number
Cells(R, 3) = (Documents(1).Tables(2).Rows(2).Cells(2)) ' Part number
Cells(R, 4) = (Documents(1).Tables(2).Rows(2).Cells(3)) ' Description
Cells(R, 5) = (Documents(1).Tables(2).Rows(2).Cells(4)) ' Qty
Cells(R, 6) = (Documents(1).Tables(2).Rows(2).Cells(5)) ' Price
All ideas are welcome
Phil
End Sub