Hi,
I have a shape that contains text, what I need is to change the font size of any text between "()". How can I do that?
I was able to write below macro and it worked, however, the characters might change in future and I need to update below macro to cover this:
I have a shape that contains text, what I need is to change the font size of any text between "()". How can I do that?
I was able to write below macro and it worked, however, the characters might change in future and I need to update below macro to cover this:
Code:
Sub Change_Font_Size()
Set aSht = ActiveSheet
Set p1sht = Sheets("Page1")
Set p2Sht = Sheets("Page2")
Dim shp As Shape
With p1sht.Shapes("Slide_Title")
.TextFrame2.WordWrap = msoFalse
.TextFrame2.TextRange.Font.Bold = msoTrue
.TextFrame2.TextRange.Characters(1, 45).Font.Size = 22
.TextFrame2.TextRange.Characters(46, 18).Font.Size = 16
End With
With p2Sht.Shapes("Slide_Title")
.TextFrame2.WordWrap = msoFalse
.TextFrame2.TextRange.Font.Bold = msoTrue
.TextFrame2.TextRange.Characters(1, 33).Font.Size = 22
.TextFrame2.TextRange.Characters(34, 41).Font.Size = 16
End With
End Sub