I'm trying to copy Tables from Word to Excel
I found a way with this:
Set ExcelSheet = CreateObject("Excel.sheet")
[and in a 'For .. Next' block...]
ActiveDocument.Tables(TableCount).Select
Selection.Copy
ExcelSheet.Application.Cells(RowNumber,ColumnNumber).Select
ExcelSheet.Application.ActiveSheet.Paste
This is working but too slow. Because when it does copy the tables,user can
see the whole selecting,copying an pasting processes on the screen and it takes
time to show it to user.
Then i tried to add this to the code:
ExcelSheet.Application.Visible = False
[and]
ThisDocument.Application.Visible = False
Then when Program starts,user can't see any window but it's still too slow.
Is there any other solution?
In Word, Table object has Range object and Range object has Cell object. In
the Watch window, when i add "ThisDocument.Tables(TableCount).Range.Cells" i
figured out that is very similar(not totatly!) to the Range Object of Excel. But
i can't do something like that:
Dim RngObj as Range
Dim TblObj as Table
Set RngObj=TblObj.Range
This causes a 'Type Mismatch Error' and still i can't find any other solution
except the previous "old grandpa method" => Copy&Paste...
Any Ideas?