I'd like to protect a patient's name from the spell checker. Patient's
name varies from document to document with each patient having a
personal single document file. Each patient's name appears multiple
times in the document.

Adding an ever-increasing number of patients' names to the custom
dictionary in an ongoing constantly updating fashion is unreasonable.

Is there a reasonable way to preclude spell checker from identifying
their names as misspellings? Perhaps I could automate copying the
patient's name into one of the document properties and any item in that
location would be protected from spell check? Using fields and/or
sections protected from spell check seems fraught with multiple
difficulties for many MS Word users.

Alternatively, an automated addition of patient's name to the custom
dictionary might work. ? perhaps something like the following to add to
"myNames.dic" where code has previously selected the patient's name.

Dim tempNam as string
tempNam = Selection.Text
Set myNames.doc =_
Application.CustomDictionaries.ActiveCustomDictionary
Dim d 'Create a variable
Set d = CreateObject(Scripting.Dictionary)
' Object.Add Key, Item
d.Add "a", "Athens" 'Add some keys and items
d.Add "b", "Belgrade"
d.Add "c", "Cairo"
d.Add tempnam


or maybe something simpler?
"spell check but not check variable"
;)

tia,
Gil
http://www.TenSecondMedicalRecord.com

Re: protect variable from spell check? by Jay

Jay
Tue Mar 13 19:46:36 CDT 2007

Assuming you have some base template with unchanging text, use a
document property (probably a custom one that you create in File >
Properties > Custom) to hold the name. Insert DocProperty fields in
the body of the template where the name should be repeated. Make a
character style that includes the Language > Do not check spelling
option, and apply that style to each DocProperty field.

Don't even think of adding names to the custom dictionary -- that way
lies madness!

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Tue, 13 Mar 2007 23:54:39 GMT, Gil <badEmail@email.com> wrote:

>I'd like to protect a patient's name from the spell checker. Patient's
>name varies from document to document with each patient having a
>personal single document file. Each patient's name appears multiple
>times in the document.
>
>Adding an ever-increasing number of patients' names to the custom
>dictionary in an ongoing constantly updating fashion is unreasonable.
>
>Is there a reasonable way to preclude spell checker from identifying
>their names as misspellings? Perhaps I could automate copying the
>patient's name into one of the document properties and any item in that
>location would be protected from spell check? Using fields and/or
>sections protected from spell check seems fraught with multiple
>difficulties for many MS Word users.
>
>Alternatively, an automated addition of patient's name to the custom
>dictionary might work. ? perhaps something like the following to add to
>"myNames.dic" where code has previously selected the patient's name.
>
> Dim tempNam as string
> tempNam = Selection.Text
> Set myNames.doc =_
>Application.CustomDictionaries.ActiveCustomDictionary
> Dim d 'Create a variable
> Set d = CreateObject(Scripting.Dictionary)
>' Object.Add Key, Item
> d.Add "a", "Athens" 'Add some keys and items
> d.Add "b", "Belgrade"
> d.Add "c", "Cairo"
> d.Add tempnam
>
>
>or maybe something simpler?
>"spell check but not check variable"
>;)
>
>tia,
>Gil
>http://www.TenSecondMedicalRecord.com

Re: protect variable from spell check? by Jezebel

Jezebel
Tue Mar 13 19:51:09 CDT 2007

1. Define a character style whose sole property is Language: 'Do not check
grammar or spelling'.

2. Apply that style to each instance of your patients' names. If the names
are always inserted by using a DocProperty field, you could use Find and
Replace: display field codes, then Find = ^d DocProperty




"Gil" <badEmail@email.com> wrote in message
news:Xns98F2CA911C1F5badEmailemailcom@216.77.188.18...
> I'd like to protect a patient's name from the spell checker. Patient's
> name varies from document to document with each patient having a
> personal single document file. Each patient's name appears multiple
> times in the document.
>
> Adding an ever-increasing number of patients' names to the custom
> dictionary in an ongoing constantly updating fashion is unreasonable.
>
> Is there a reasonable way to preclude spell checker from identifying
> their names as misspellings? Perhaps I could automate copying the
> patient's name into one of the document properties and any item in that
> location would be protected from spell check? Using fields and/or
> sections protected from spell check seems fraught with multiple
> difficulties for many MS Word users.
>
> Alternatively, an automated addition of patient's name to the custom
> dictionary might work. . perhaps something like the following to add to
> "myNames.dic" where code has previously selected the patient's name.
>
> Dim tempNam as string
> tempNam = Selection.Text
> Set myNames.doc =_
> Application.CustomDictionaries.ActiveCustomDictionary
> Dim d 'Create a variable
> Set d = CreateObject(Scripting.Dictionary)
> ' Object.Add Key, Item
> d.Add "a", "Athens" 'Add some keys and items
> d.Add "b", "Belgrade"
> d.Add "c", "Cairo"
> d.Add tempnam
>
>
> or maybe something simpler?
> "spell check but not check variable"
> ;)
>
> tia,
> Gil
> http://www.TenSecondMedicalRecord.com
>



Re: protect variable from spell check? by Gil

Gil
Tue Mar 13 20:17:54 CDT 2007

Thanks for your responses. Madness is my specialty <g>

Hmmmm. I wonder if I could use the style method/ Language/ Do not check
spelling, without using fields through the records. This
is for medical records and would need to be quite user friendly.

I'll play with it. :)

Hmmm, again, I now see Jez' addition.

Thanks. That looks like it should do it.

Cheers,
Gil