Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have made several macros before and I am sure I am doing it right but I can't seem to make a macro to send a chart over to excel. The chart is very big (around 80 columns) so it doesn't surprise me it doesn't work but when I click on the "Send to Excel" button on the caption of the chart it works. Is there a reason why the macro isn't working? For simplicity sakes I tried to export only the chart.
Sub Detail()
Set XLApp = CreateObject("Excel.Application")
XLApp.Visible = false
Set XLDoc = XLApp.Workbooks.Add
XLDoc.Sheets.Add.Name= "Detail Report"
DET = "Detail Report"
ActiveDocument.GetSheetObject("CH17").CopyTableToClipboard true
XLDoc.Sheets(DET).Range("A" & 8).Select
XLDoc.Sheets(DET).Paste
XLApp.Visible = True
End Sub
Try the waitforidle line before the copytable to clipboard line.
You don't want to copy the table until it is done rendering.