Hello;
I have a word 2007 document with several tabels made in the same application (Word) that I wish to convert to Excel embedded objects. So far I've not found the correct VBA method to paste the table in the correct format once I have it in the clipboard. I appreciate any help as I'm quite new to Word VBA.
Sub ConvertToExcel()
Dim T as Table
For each T in ActiveDocument.Tables
T.Select 'To see what table it is selecting
With Selection
.Cut
End With
Word.Application.Selection.PasteExcelTable false, false, false 'Generates error
Next T
End Sub
I have a word 2007 document with several tabels made in the same application (Word) that I wish to convert to Excel embedded objects. So far I've not found the correct VBA method to paste the table in the correct format once I have it in the clipboard. I appreciate any help as I'm quite new to Word VBA.
Sub ConvertToExcel()
Dim T as Table
For each T in ActiveDocument.Tables
T.Select 'To see what table it is selecting
With Selection
.Cut
End With
Word.Application.Selection.PasteExcelTable false, false, false 'Generates error
Next T
End Sub