M
Marty
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.
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.