Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi Experts
Is there any way to export captions of text objects to PPT using Macro?
This is what I want to do.

This is a current result

I am using below VB Script. It works ok but No captions.
Sub ExportPPT
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Add
    For i = 0 To ActiveDocument.NoOfSheets - 3
        Set MySheet = ActiveDocument.GetSheet(i)
        Set PPSlide = objPresentation.Slides.Add(1,12)
        ActiveDocument.ActiveSheet.CopyBitmapToClipboard
ActiveDocument.GetSheetObject("TX01").CopyBitmapToClipboard
objPPT.Visible = True
        PPSlide.Shapes.Paste()
                    
    Next
Set PPSlide = Nothing
Set PPPres = Nothing
End sub
Thanks,
Kiyomi
.png) 
					
				
		
 Miguel_Angel_Ba
		
			Miguel_Angel_BaCheck 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.
 
					
				
		
Hi Miguel
Thank you for replying.
Is this script only for Excel?
I tried it but not succeeded.
Where should I change this script?
Thank you
Kiyomi
.png) 
					
				
		
 Miguel_Angel_Ba
		
			Miguel_Angel_BaYes, 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
