Custom rules for words to not spell check

C

Csaba Gabor

Is there any way that I can tell Word not to
not spell check words starting with $?

Motivation: I'm writing a document in
Word 2003 / Win XP Pro, which document has
PHP computer code interspersed. Variable
names are uniformly indicated by a dollar
sign ($) prefixing the variable name
(eg. $myVar). These should be ignored for
purposes of spell checking.

I noticed that under
Tools \ Spelling and Grammar \ Options
there is the possibility to ignore words
in UPPERCASE and words with numbers. So I'm
asking can I, possibly with VBA, expand upon
this?

Thanks,
Csaba Gabor from Vienna
 
P

Pranav Vaidya

Hi Csaba Gabor,

Go to
Tools-->Options-->Sepllings & Grammer -->Custom Dictionaries-->Modify

Here a list of words will be shown that you already may have added.
Add an entry as $* in this list, this will enable Word to ignore all the
words starting from $. The * works as wild char here.

HTH,

use the following option to set this-
 
C

Csaba Gabor

Pranav said:
Hi Csaba Gabor,

Go to
Tools-->Options-->Sepllings & Grammer -->Custom Dictionaries-->Modify

Here a list of words will be shown that you already may have added.
Add an entry as $* in this list, this will enable Word to ignore all the
words starting from $. The * works as wild char here.

Wow! This is fabulous, thanks very much, and worked like a charm
for ignoring spell checking on words starting with a $

I'd like to ask some followup questions:
What wild cards do dictionaries know about and how do they work?

For example, I wanted to ignore auto_prepend_file so I added to
the custom dictionary *_* thinking that all words with an underscore
should be ignored. Didn't work. OK, I was too greedy. I'll try
auto_*. Still no luck. Fine. auto*. No dice. Finally putting
in the whole word, auto_prepend_file, took care of it.

Also, suppose I want to ignore all "words" which have a period
in them. That is, text delimited by white space on either end
and which has a dot (period) amongst the characters. e.g.
WScript.Shell and file.vbs

Thanks,
Csaba Gabor from Vienna
 
O

Opinicus

Pranav Vaidya said:
Go to
Tools-->Options-->Sepllings & Grammer -->Custom Dictionaries-->Modify
Here a list of words will be shown that you already may have added.
Add an entry as $* in this list, this will enable Word to ignore all the
words starting from $. The * works as wild char here.

I'm not seeing this behavior. (Using Word 2002 in Office XP.)
 

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