Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have an application, where 2 Straight Table. I want to export the both straight table data in Single Excel but in sheet1 and Sheet 2.
Macro is working but it is not exporting CH01 object data, In both sheet CH02 data is coming.
Below is my code :
Sub ExcelFile
DIM ExcelApplication, ExcelWorkbook
SET ExcelApplication = CREATEOBJECT("Excel.Application")
SET ExcelWorkbook = ExcelApplication.Workbooks.AddSET MyExcelApp = NothingActiveDocument.GetSheetObject("CH01").CopyTableToClipBoard TRUEActiveDocument.GetSheetObject("CH02").CopyTableToClipBoard TRUE
ExcelWorkbook.Worksheets(1).PasteExcelWorkbook.Worksheets(2).Paste
ExcelApplication.DisplayAlerts = FALSE
ExcelWorkbook.SaveAs "C:\Users\User\Downloads\test.xls",56
ExcelApplication.Quit
MsgBox "Export Complete"
End Sub
I am also attaching my QVW.
Please do the needful. Thanks in advance.
Regards,
AK