#1
|
|||
|
|||
Codes for Word Textbox Font Color?
I've been searching the Internet for the codes but haven't yet found it. Could someone here point me how to do it? I want a No-Fill for the texts.
Code:
ActiveDocument.Shapes(1).Font.ColorIndex ... Thanks in advance. |
#2
|
||||
|
||||
There is no '.Shapes(1).Font' property. Try something along the lines of:
ActiveDocument.Shapes(1).TextFrame.TextRange.Font. ColorIndex = wdDarkBlue
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Quote:
Yet, I would like to know when I insert a text box with a few texts, how can I text fill it with no fill? Cos in Font.ColorIndex, we don't have the "No Fill" option. |
#4
|
||||
|
||||
There is no such thing as a "No Fill" Font.ColorIndex. What are you trying to achieve?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Quote:
Type some texts inside. Go to the Format ribbon. There should be a Text Fill option and under that, I chose No Fill. In effect, the texts are hidden. Just cannot find how to do it in VBA. |
#6
|
||||
|
||||
I do not see a 'Text Fill' option. There is a 'Shape Fill' option, but that has nothing to do with the text colour.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
|
#8
|
||||
|
||||
OK, you're evidently not working in Compatability mode. In that mode, one doesn't get to see anything to do with Word Art on the Drawing Tools tab.
You can achieve the 'no fill' effect by setting the text visibility to false: ActiveDocument.Shapes(1).TextFrame.TextRange.Font. Fill.Visible = msoFalse
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word macro doesn't change font color | Spideriffic | Word VBA | 8 | 11-04-2015 03:47 AM |
Word 2010- help setting automatic font color | Jazz43 | Word | 7 | 09-27-2012 10:59 PM |
Apply font color programatically using VBA Word | divakarganta | Word VBA | 3 | 08-08-2012 08:05 PM |
textbox color issue | Dave Duncan | Word | 0 | 08-07-2011 10:38 AM |
Word 2007 Font Color Doesn't Work | nnicko | Word | 2 | 04-16-2010 01:21 PM |