Check this thread for a very similar request:Export to Excel. While the original poster requested excel, the issue with the caption is covered with the lines
chartCaption = tableToExport.GetCaption.Name.v
You will need to adapt the macro code to your own objects or charts.
Thank you for replying.
Is this script only for Excel?
I tried it but not succeeded.
- 'Get the chart we want to export
- Set tableToExport = ActiveDocument.GetSheetObject("CH01")
- Set chartProperties = tableToExport.GetProperties
- tableToExport.CopyTableToClipboard true
- 'Get the caption
- chartCaption = tableToExport.GetCaption.Name.v
- 'MsgBox chartCaption
Where should I change this script?
Yes, the code as I mentioned above is only for Excel (see the name of the post and the code) and you will need to recreate it for PowerPoint. I cannot tell you from memory how it will look like but I'm sure there are some powerpoint examples in the Community you can search for and use along with mine to set up yours