View Single Post
 
Old 04-09-2018, 03:35 AM
BLUEPUPIL BLUEPUPIL is offline Windows 7 64bit Office 2016
Novice
 
Join Date: Feb 2016
Posts: 20
BLUEPUPIL is on a distinguished road
Default Text box- text color

I've got a macro, which inserts a text box with a symbol(text) in it. The color of the symbol is Black-(R,G,B)-0,0,0. I want to make it Red-(R,G,B)- 255,0,0. There are two options to achieve this. First by altering the color from black to red and second by changing the initial color. The main difficulty for me is to recognize which part of the macro script deals with the symbol(text) color. Do you have any suggеstions?
Code:
Sub InsertTB()
Dim Shp As Shape
Set Shp = ActiveDocument.Shapes.AddTextbox(1, fcnXCoord, fcnYCoord, 288, 72)
With Shp
.TextFrame.TextRange.InsertSymbol Font:="+Body", CharacterNumber:=9679, Unicode:=True
.Line.Visible = msoFalse
.Fill.Visible = msoFalse
.Width = 155#
.Height = 62#
End With
Set Shp = Nothing
End Sub
Function fcnXCoord() As Double
fcnXCoord = Selection.Information(wdHorizontalPositionRelativeToPage)
End Function
Function fcnYCoord() As Double
fcnYCoord = Selection.Information(wdVerticalPositionRelativeToPage)
End Function
Reply With Quote