G
Gil
Hello,
I use the folowing Sub to add a TextBox to the last slide of my ppt,
Sub GetOLETextBoxRef()
Dim shp As Shape
Dim txtBox As TextBox
Dim lastSlideNumber As Integer
lastSlideNumber = ActivePresentation.Slides.Count
' Set a reference to the added shape
Set shp = ActivePresentation.Slides(lastSlideNumber).Shapes. _
AddOLEObject(174#, 222#, 175#, 25#, _
ClassName:="Forms.TextBox.1")
'Now get the object reference from the shape reference
Set txtBox = shp.OLEFormat.Object
' Format properties of the textbox as required.
With txtBox
.Text = "This is the best NG"
End With
End Sub
I want to change textBox properties like: fill, color, hyperlink etc.
I added the folowing code before the last 'End with' but I get error.
.Fill.Visible = msoTrue
.Fill.Solid
.Fill.ForeColor.RGB = RGB(153, 204, 255)
.Fill.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = ppForeground
.Line.BackColor.RGB = RGB(255, 255, 255)
How can I modify my textBox properties ?
Thank you
Gil D.
I use the folowing Sub to add a TextBox to the last slide of my ppt,
Sub GetOLETextBoxRef()
Dim shp As Shape
Dim txtBox As TextBox
Dim lastSlideNumber As Integer
lastSlideNumber = ActivePresentation.Slides.Count
' Set a reference to the added shape
Set shp = ActivePresentation.Slides(lastSlideNumber).Shapes. _
AddOLEObject(174#, 222#, 175#, 25#, _
ClassName:="Forms.TextBox.1")
'Now get the object reference from the shape reference
Set txtBox = shp.OLEFormat.Object
' Format properties of the textbox as required.
With txtBox
.Text = "This is the best NG"
End With
End Sub
I want to change textBox properties like: fill, color, hyperlink etc.
I added the folowing code before the last 'End with' but I get error.
.Fill.Visible = msoTrue
.Fill.Solid
.Fill.ForeColor.RGB = RGB(153, 204, 255)
.Fill.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = ppForeground
.Line.BackColor.RGB = RGB(255, 255, 255)
How can I modify my textBox properties ?
Thank you
Gil D.