how to change color of wavy red spell check lines

P

parkay96

Currently using Word 2003 SP3.
Wanting to know if able to change color of wavy red line that appears under
misspelled words?
 
J

Jean-Guy Marcil

parkay96 said:
Currently using Word 2003 SP3.
Wanting to know if able to change color of wavy red line that appears under
misspelled words?

No can do!

Why would you want to do that?
 
P

parkay96

My corporate office created a form with cells that are shaded in red.
Therefore, when a word is misspelled the red wavy line is not visible.
 
J

Jay Freedman

For Word 2007 the article http://support.microsoft.com/kb/925597 explains
what to do in the registry.

It seems to me it would have been friendlier to make sure the support
template's macro got updated, but I'm just a code monkey. :)

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
T

Tony Jollans

Thanks, Jay,

I wonder why they broke it in the first place (or have they fixed a bug it
previously relied on?). Is it documented anywhere?
 
J

Jay Freedman

I just scrounged up a copy of the Support.dot template from Word 2003 and
tried it in Word 2007. It does _not_ appear to be broken, at least with
respect to the spelling underline color -- except that it stores the decimal
value of the RGB color in the registry, while the 925597 article says it
should be hexadecimal.

However, following the instructions in the 925597 article, the wavy
underline stayed red regardless of what value I put into the registry entry.
So maybe the whole mechanism is broken. I haven't yet put any effort into
trying the other settings... something for a rainy afternoon, which we've
been promised for the coming weekend. :-(
 
T

Tony Jollans

The problem is that the template writes a string value (REG_SZ) to the
registry when it needs to be a doubleword (REG_DWORD). It seems to be a
change in the behaviour of PrivateProfileString in 2007.
 
J

Jay Freedman

Hi Tony,

You're precisely correct. I've now tried the same support.dot template in both
2003 and 2007, with and without pre-existing entries. When it runs from 2003,
the PrivateProfileString creates a REG_DWORD; when it runs from 2007, the same
code creates a REG_SZ. If there's a REG_DWORD there already, it's overwritten
with a REG_SZ.

When the value is a REG_DWORD, it works properly in both versions; when it's a
REG_SZ, the underline stays red. I suppose it's some consolation that Word
simply ignores a REG_SZ instead of throwing an exception. ;-)

I haven't been able to find any description on the web of this change in
PrivateProfileString's behavior (unless it's in one of the many non-English
items that Google turned up). Interestingly, the help for it has always said
that it writes a "string", so I guess it's a little surprising that it ever
wrote a DWORD.

The fix would have to involve use of the RegSetValueEx function of the Win32API,
which lets you specify the value's type; and that in turn would need
RegOpenKeyEx and RegCloseKey. It isn't terribly difficult if you're used to API
programming.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all
may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top