View Single Post
 
Old 08-10-2016, 09:37 AM
Nick70 Nick70 is offline Windows 10 Office 2010 64bit
Novice
 
Join Date: Jun 2016
Location: London
Posts: 13
Nick70 is on a distinguished road
Default Insert Text with specific Font Size

Hi,

I have a macro that inserts a text ("NEW") in a specific slide (in this case slide 2).
I would now like to amend the font of this text to Font Size 20.

What code should I add to do this?

Current Code

HTML Code:
Sub Textboxnew()
    Dim myTextBox As Shape
    With ActivePresentation.Slides(2)
        Set myTextBox = .Shapes.AddTextbox _
            (Orientation:=msoTextOrientationHorizontal, Left:=450, Top:=20, _
            Width:=100, Height:=100)
        myTextBox.TextFrame.TextRange.Text = "NEW"
        myTextBox.TextFrame.TextRange.Font.Color.RGB = vbRed
    End With
End Sub
Thanks,
Nic

Reply With Quote