Below is a small sample of working vbscript I use for exporting a straight table and a pie chart of the same data. I would like to update this code such that I can simply export BOTH the straight table AND the pie chart from the same chart (via fast change, which is set up) into excel and completely delete the unnecessary second chart on my sheet. Any ideas?
Thanks,
James
'paste first straight table at A4, and then paste the fast change pie chart below it
ActiveDocument.GetSheetObject("CH20").CopyTableToClipboard true
XLApp.Range("A4").Select
XLDoc.Sheets(1).Paste()
XLApp.Range("A500").End(-4162).Select
XLApp.Selection.offset(3,0).Select
'Sheet needs to be active or else images of charts will NOT export
set oDoc = ActiveDocument
set oSht = oDoc.Sheets(1)
oSht.Activate
'pie chart..currently a SEPARATE chart CH28...but it already exists in first chart CH20 via fast change
ActiveDocument.GetSheetObject("CH28").CopyBitmapToClipboard
XLDoc.Sheets(1).PasteSpecial DataType=wdPasteBitmap
XLApp.Range("A500").End(-4162).Select