PDA

View Full Version : How to call Word “Font Color” picker(?) from VBA?



almeck
04-28-2009, 01:44 PM
While I know how to invoke a Dialog Box from Word VBA, I don’t know how to invoke the “Font Color” picker (the button in the Ribbon that initially shows an “A” with a thick red underline (the default/last chosen font color)).

Any thoughts?

joms
04-29-2009, 07:41 PM
don't know if you mean this one


Sub Macro10()
'
' Macro10 Macro
' Macro recorded 4/30/2009 by joms
'
CommandBars("Formatting").Visible = True
End Sub

almeck
04-30-2009, 10:03 AM
Thanks, but this doesn't seem to have any effect (I'm using Word 2007, maybe that's part of the problem?).

Currently, I've settled for:

Dialogs(wdDialogFormatFont).Show

which shows what used to be the Format dialog box, I think. It's very useful and allows setting many font attributes from the same dialog box.

I don't believe this dialog box can be accessed from the defualt Word 2007 ribbon. I finally found it listed as "Font ...", an extra command that can be added to the Quick Access Toolbar (which I've done). Surprising that you have to hunt for such a useful tool.

Paul_Hossler
04-30-2009, 01:12 PM
I added 'FontColorPicker' to the QAT. Is that the one you mean?

Paul

almeck
04-30-2009, 02:11 PM
Yep, that's the one I've been trying to invoke via VBA. If you know how to do that, pls let me know. Thanks.