2010 Word / VBA code to change font outline color

KenWit

Board Regular
Joined
Nov 21, 2011
Messages
68
Nothing on the web about how to do this. I'd like to change the outline font color of selected text from black to light gray.
(It's the special effects outline, on the ribbon drop-down menu to the left of the text highlight.
Not the one in the font dialogue box check-box list that can be manipulated with selection.Font.Outline.)
Any suggestions appreciated.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Bumping thread, in case someone has a solution to this. :confused:
Programically changing the line weight of the outline, from 1/4 pt to 1/2 pt, would be helpful too.
 
Upvote 0
I'm not aware those methods are exposed to VBA. That said, you could use Sendkeys:
Code:
Sub Demo()
'Change Text Outline Colour - change the RGB values to suit
SendKeys "%Hftom^{TAB}%R255%G127%B0{ENTER}"
'Change Text Outline Weight - add more {DOWN} expressions to increase weight.
SendKeys "%Hftow{DOWN}{ENTER}"
Application.ScreenUpdating = True
End Sub
 
Upvote 0
One thing though. I tried changing the color to a light shade of gray which is what I'd like, %R234%G234%B234, along with some other test colors and the outline remained black?
 
Upvote 0
It works for me. Do note that, depending on the font name, size & colour, with such a light shade you're unlikely to notice much (if any) change from a white background unless you're using fairly heavy weighting.
 
Last edited:
Upvote 0
Maybe it's just a glitch. I still can't get it to work, even when I increase the font size to 24 and the view to 200% and make the font color white so the outline stands out. I also switched from Calibri which I always use to Arial and also Times Roman. (Outline is still black.) I'll try it again on my computer at home and see what happens. I know VBA acts funny and inexplicable sometimes. In any event, just being able to change the outline weight is a huge help. Thanks.
 
Upvote 0
It might also just be that your monitor isn't too good at displaying such light shading.
 
Upvote 0

Forum statistics

Threads
1,225,767
Messages
6,186,906
Members
453,386
Latest member
testmaster

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top