If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Changing text color within a text box using VBA
I am building a presentation and slide using VBA. I have a text box that is
added to the slide. All of this works well. Is there a way to change the text properties in the text box when adding addtional text to the existing text? I have three lines of text in the text box. I want the first line to be black, the second to be blue, and the third to be red. Any help is greatly appreciated. |
#2
|
|||
|
|||
Changing text color within a text box using VBA
This code will do that for shape 1 on slide 1:
ActivePresentation.Slides(1).Shapes(1).TextFrame.T extRange. _ Paragraphs(1).Font.Color.RGB = vbBlack ActivePresentation.Slides(1).Shapes(1).TextFrame.T extRange. _ Paragraphs(2).Font.Color.RGB = vbBlue ActivePresentation.Slides(1).Shapes(1).TextFrame.T extRange. _ Paragraphs(3).Font.Color.RGB = vbRed --David -- David M. Marcovitz Microsoft PowerPoint MVP Director of Graduate Programs in Educational Technology Loyola College in Maryland Author of _Powerful PowerPoint for Educators_ http://www.PowerfulPowerPoint.com/ =?Utf-8?B?Y2FtbGVy?= wrote in : I am building a presentation and slide using VBA. I have a text box that is added to the slide. All of this works well. Is there a way to change the text properties in the text box when adding addtional text to the existing text? I have three lines of text in the text box. I want the first line to be black, the second to be blue, and the third to be red. Any help is greatly appreciated. |
Thread Tools | |
Display Modes | |
|
|