An implementation of Visual Basic that is built into Microsoft products.
Use a string for the font name and set the font properties before or after assigning the text; the key issue is that Impact must be quoted.
Change this line:
resultsSlide.Shapes("Loser").TextFrame.TextRange.Font.name = Impact
to:
resultsSlide.Shapes("Loser").TextFrame.TextRange.Font.Name = "Impact"
A cleaned-up version of the macro:
Sub SetLoser()
Dim resultsSlide As Slide
Dim resultsSlideIndex As Integer
Dim losingTeam As String
losingTeam = "TEAM 1"
resultsSlideIndex = ActivePresentation.Slides.Count
Set resultsSlide = ActivePresentation.Slides(resultsSlideIndex)
With resultsSlide.Shapes("Loser").TextFrame.TextRange
.Text = losingTeam
.Font.Name = "Impact"
.Font.Size = 60
.Font.Color.RGB = RGB(255, 192, 0)
End With
End Sub
This sets the text, font name, size, and color for the entire text range of the shape named "Loser" on the last slide.
References: