Hi,
I need to export all objects of a document into excel.
I have written the code as follows:
sub exp
Set objExcelApp = CreateObject("Excel.Application")
objExcelApp.Visible = true
Set objExcelDoc = objExcelApp.Workbooks.Add
set s = ActiveDocument.ActiveSheet
objs = s.GetSheetObjects
msgbox ubound(objs)
for i=lbound(objs) to ubound(objs)
msgbox objs(i).GetObjectID()
set xlSheet = objExcelDoc.Worksheets(1)
objs(i).SendToExcel
next
end sub
When i execute the above code, for each objs(i).sendToExcel, it opens a new xls file. But i need to send all the objects in the document into one excel sheet.
Please suggest how to proceed...
Thanks!!