Private Sub CommandButton1_Click()
Dim Sld As Slide
Dim Shp As Shape
'ERROR HANDLING
If ActivePresentation.Slides.Count = 0 Then
MsgBox "You do not have any slides in your PowerPoint project."
Exit Sub
End If
Set Sld = Application.ActiveWindow.View.Slide
'Create shape with Specified Dimensions and Slide Position
Set Shp = Sld.Shapes.AddShape(Type:=msoShapeFlowchartPredefinedProcess, _
Left:=50, Top:=100, Width:=83.52, Height:=41.62)
'FORMAT SHAPE
'Shape Name
Shp.Name = "My Header"
'No Shape Border
Shp.Line.Visible = msoTrue
'Shape Fill Color
Shp.Fill.ForeColor.RGB = RGB(255, 255, 255)
'Shape Text Color
Shp.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
'Text inside Shape
Shp.TextFrame.TextRange.Characters.Text = TextBox1
'Center Align Text
Shp.TextFrame.TextRange.Paragraphs.ParagraphFormat.Alignment = ppAlignCenter
'Vertically Align Text to Middle
Shp.TextFrame2.VerticalAnchor = msoAnchorMiddle
'Adjust Font Size
Shp.TextFrame2.TextRange.Font.Size = 8
'Adjust Font Style
Shp.TextFrame2.TextRange.Font.Name = "Verdana (Body)"
Unload UserForm4
End Sub