Tuesday, November 24, 2020

Macro to Change the Font/Color/Size/Alignment of Text Box content PowerPoint

Macro code to ease your manual work, if you have large number of slides in your presentation and globally want to change the property of text then below code is helpful.

You can change the Font Size, Font Color, Font Property like  Bold, Italic, underline, Font Type, Shadow and many more

Use below code in Power Point file and execute below macro code

Sub TextSize()
Dim oSl As Slide
Dim oSh As Shape
With ActivePresentation
For Each oSl In .Slides
For Each oSh In oSl.Shapes
With oSh
If .HasTextFrame Then
If .TextFrame.HasText Then
.TextFrame.TextRange.Font.Size = 48
.TextFrame.TextRange.Font.Color = RGB(112, 48, 160)
.TextFrame.TextRange.Font.Italic = msoTrue
.TextFrame.TextRange.Font.Name = "Brush Script MT"
.TextFrame.TextRange.Font.Shadow = msoTrue
.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
End If
End If
End With
Next
Next
End With
End Sub

No comments:

Post a Comment

web stats