Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am using below macro script to export object in Excel.
sub ExportToExcel
set obj = ActiveDocument.GetSheetObject("CH203") 'Should be changed ObjID
obj.ExportEx "D:\Hethu\Dinesh\Smart Sales\01082018\DSR_Report.xls", 5 'Should be changed Path
end sub
I want to paste the object in A6 cell. Kindly help me.
Thanks in advance.
Regards,
Dinesh Kumar Mani.
This will require using IE and the QV Plugin. Macro Security settings must be System Level.
sub ExportDeptWorkbooks
strFileName = "D:\Hethu\Dinesh\Smart Sales\01082018\DSR_Report.xls"
Set XLApp = CreateObject("Excel.Application")
XLApp.Visible = true
Set XLWorkbook = XLApp.Workbooks.Add()
XLSheet.Range("A6").select
ActiveDocument.GetSheetObject("CH07").CopyTableToClipboard true 'Should be changed ObjID
XLSheet.Paste
XLWorkbook.SaveAs strFileName, -4143
XLApp.quit
Set XLSheet = Nothing
Set XLWorkbook = Nothing
Set XLApp = Nothing
end sub
May be, use this macro: