You are on page 1of 1

Sub AnimateFont()

Dim sAnimation As String


If Len(Selection.Range) = 0 Then
MsgBox "Select text first!", vbCritical, "No Text Selected"
Exit Sub
End If
sAnimation = InputBox("Which animation? Enter the number: " & vbCr & _
" 1. Blinking Background" & vbCr & _
" 2. Las Vegas Lights" & vbCr & _
" 3. Marching Black Ants" & vbCr & _
" 4. Marching Red Ants" & vbCr & _
" 5. Shimmer" & vbCr & _
" 6. Sparkle Text" & vbCr & _
" 0. None", "Font animation")
Select Case sAnimation
Case 1: Selection.Font.Animation = wdAnimationBlinkingBackground
Case 2: Selection.Font.Animation = wdAnimationLasVegasLights
Case 3: Selection.Font.Animation = wdAnimationMarchingBlackAnts
Case 4: Selection.Font.Animation = wdAnimationMarchingRedAnts
Case 5: Selection.Font.Animation = wdAnimationShimmer
Case 6: Selection.Font.Animation = wdAnimationSparkleText
Case 0: Selection.Font.Animation = wdAnimationNone
Case Else:
End Select
End Sub

You might also like