Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I am using the below macro to export two charts to excel,
sub exportexcelwhenfiltered2
set oXL=CreateObject("Excel.Application")
oXL.visible=True
oXL.Workbooks.Add
aSheetObj=Array("CH241","CH240")
for i=0 to UBound(aSheetObj)
oXL.Sheets.Add
Set oSH = oXL.ActiveSheet
oSH.Range("A1").Select
Set obj = ActiveDocument.GetSheetObject(aSheetObj(i))
obj.CopyTableToClipboard True
oSH.Paste
sCaption=obj.GetCaption.Name.v
set obj=Nothing
oSH.Rows("1:1").Select
oXL.Selection.Font.Bold = True
oSH.Cells.Select
oXL.Selection.Columns.AutoFit
oSH.Name=left(sCaption,30)
set oSH=Nothing
next
set oXL=Nothing
end sub
which works fine,
now i am trying to incorporate another object ID which is a text object to be exported to excel as third sheet,
I have no luck when I added the text object with ID TX880, it doesnt seem to work,
is there a way to do this?