![]() |
#1
|
|||
|
|||
![]()
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 Nic ![]() ![]() |
#2
|
|||
|
|||
![]()
In fact I managed to amend code accordingly
HTML Code:
Sub Textboxnew() Dim myTextBox As Shape With ActivePresentation.Slides(1) 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 myTextBox.TextFrame.TextRange.Font.Size = 20 End With End Sub |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA Word - Find Text Font Color - Insert New Text | jc491 | Word VBA | 2 | 01-04-2016 05:42 PM |
![]() |
mescaL | Word VBA | 3 | 11-03-2014 10:51 PM |
![]() |
JustAboutNoon | Word VBA | 3 | 10-09-2014 10:21 AM |
![]() |
BlueClearSky | Word | 6 | 11-22-2013 03:34 PM |
![]() |
Oryctolagus | Word | 1 | 11-13-2013 09:27 AM |