N
nims
I'm trying to create code for excel that will allow me to open a series
of word documents, copy certain rows from tables in those docs, and
paste them into the excel worksheet.
The main problem I'm having is with formatting. I am able to paste the
data in Excel, but there are characters added for spaces in the cells.
Here is my code:
Dim oWrd As Object
Set oWrd = CreateObject("Word.Application")
Dim oDoc As Object
Set oDoc = CreateObject("Word.Document")
Set oDoc = oWrd.Documents.Open("c:\OMA\TIJ_90442.doc")
'oWrd.Visible = False
ActiveWorkbook.Worksheets(1).Cells(6, 1) = oDoc.Tables(1).Rows(1)
ActiveWorkbook.Worksheets(1).Cells(5, 2) = oDoc.Tables(3).Cell(3, 5)
oWrd.Quit
Set oWrd = Nothing
of word documents, copy certain rows from tables in those docs, and
paste them into the excel worksheet.
The main problem I'm having is with formatting. I am able to paste the
data in Excel, but there are characters added for spaces in the cells.
Here is my code:
Dim oWrd As Object
Set oWrd = CreateObject("Word.Application")
Dim oDoc As Object
Set oDoc = CreateObject("Word.Document")
Set oDoc = oWrd.Documents.Open("c:\OMA\TIJ_90442.doc")
'oWrd.Visible = False
ActiveWorkbook.Worksheets(1).Cells(6, 1) = oDoc.Tables(1).Rows(1)
ActiveWorkbook.Worksheets(1).Cells(5, 2) = oDoc.Tables(3).Cell(3, 5)
oWrd.Quit
Set oWrd = Nothing