I am trying to display the Font dialog and return the font color
selected by the User. I get the result back correctly for some
colors, but not for others. Here's my test macro.
MyFontColor is a static variable and if I run it once, select a color,
and then re-run it, the selected color is displayed SOMETIMES (e.g.,
if I select Red or Blue), but does NOT work if I select "Orange" or
"Rose", for example.
Sub ColorTest
Dim MyFontDlg As Dialog
Static MyFontColor
Dim res
Set MyFontDlg = Application.Dialogs(wdDialogFormatDefineStyleFont)
MyFontDlg.Color = MyFontColor
Dacapo:
res = MyFontDlg.Display
If res = 0 Then
Exit Sub
Else
MyFontColor = MyFontDlg.Color
End If
End Sub
Anyone have any ideas?
Thanks.
Anand.V.V.N - 15 Nov 2006 05:23 GMT
Hi Marty,
I think so if you use color.rgb might help i.e instead of
MyFontColor = MyFontDlg.Color
use
MyFontColor = MyFontDlg.Color.RGb
Might help you
Hope you found this useful.
Anand.

Signature
"Who will guard the guards?"
> I am trying to display the Font dialog and return the font color
> selected by the User. I get the result back correctly for some
[quoted text clipped - 25 lines]
>
> Thanks.
Marty - 15 Nov 2006 15:03 GMT
>Hi Marty,
>I think so if you use color.rgb might help i.e instead of
[quoted text clipped - 9 lines]
>
>Anand.
Thank you very much for your suggestion. This does, indeed, work.
Marty
Anand.V.V.N - 15 Nov 2006 17:29 GMT
You welcome Marty I am glad that it works

Signature
"Who will guard the guards?"
> >Hi Marty,
> >I think so if you use color.rgb might help i.e instead of
[quoted text clipped - 13 lines]
>
> Marty