Sub SPRtextbox() Dim mySlide As PowerPoint.Slide Dim strMsg As String Dim myTextbox As PowerPoint.Shape strMsg = InputBox("Enter Text", "SPR Macros") Set mySlide = ActivePresentation.Slides(ActiveWindow.View.Slide.SlideNumber)Set myTextbox = mySlide.Shapes.AddTextbox(msoTextOrientationHorizontal, _ Left:=0, Top:=10, Width:=200, Height:=50)
myTextbox.Fill.BackColor.RGB = RGB(127, 127, 127) 'grey
myTextbox.Fill.Transparency = 0.3 'translucent
myTextbox.Height = 150
myTextbox.Width = 300
myTextbox.TextFrame2.AutoSize = msoAutoSizeTextToFitShape 'https://www.pcreview.co.uk/threads/how-to-vba-code-shrink-text-on-overflow.3537036/#post-12183384
With myTextbox.TextFrame.TextRange
.Text = strMsg
With .Font
.Size = 32
.Name = "Impact"
End With
End With
With myTextbox.TextFrame2.TextRange.Font
.Line.Visible = True
.Line.ForeColor.RGB = RGB(0, 0, 0)
.Line.Weight = 1
End With
End Sub