Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I cant to copy all the active tables and charts in QVW file to Clipboard. What will be the Macro for this ??
Hi,
What the output you want to paste? Something like PDF or Excel.
Another one you can looking into <Reports> in tools bar and then add those object into your report. By the way let try this sample macro for copy object into Excel below:
SUB SendExcel()
'ActiveDocument.Reload
SET tmpFileName =ActiveDocument.Variables("vFileName") 'Create one varaible vFileName = DATE(NOW(),'YYYYMMDD') & '_ProjectStatus.xlsx'
FileName =tmpFileName.GetContent.STRING
SET XLApp =CreateObject("Excel.Application")
XLApp.Visible = FALSE
SET XLDoc = XLApp.Workbooks.Add
XLDoc.Sheets(1).name ="TestExport"
SET XLSheet = XLDoc.Worksheets(1)
SET MyTable =ActiveDocument.GetSheetObject("CH01")
SET XLSheet = XLDoc.Worksheets(1)
MyTable.CopyTableToClipboard TRUE
XLSheet.PasteXLSheet.Range("A1")
XLDoc.SaveAs "C:\" &FileName
XLApp.Visible = FALSE
XLApp.Quit
Set XLApp = Nothing
Set Table = Nothing
ActiveDocument.Save
'ActiveDocument.GetApplication.Quit
End Sub