View Single Post
 
Old 08-11-2020, 01:42 AM
JohnWilson JohnWilson is offline Windows 10 Office 2016
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

As far as I know there's no simple way to read the description.

This should do a better job of placing the text. USE A COPY!

Code:
Sub add_Caption()

Dim L As Long
Dim strAlt As String
Dim SH As Long
Dim SW As Long
SH = ActivePresentation.PageSetup.SlideHeight
SW = ActivePresentation.PageSetup.SlideWidth
' kill old text
For L = 1 To ActivePresentation.Slides.Count
If ActivePresentation.Slides(L).Shapes.Count = 2 Then
If ActivePresentation.Slides(L).Shapes(2).HasTextFrame Then _
ActivePresentation.Slides(L).Shapes(2).Delete
End If
strAlt = ActivePresentation.Slides(L).Shapes(1).AlternativeText
If Not strAlt = "" Then
With ActivePresentation.Slides(L).Shapes.AddLabel(msoTextOrientationHorizontal, SW / 2 - 100, SH - 40, 200, 20)
.TextFrame.TextRange = strAlt
.Left = SW / 2 - .Width / 2
End With
End If
Next L
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote