error 4198 in spelling protected Doc

R

Rinze Smit

Hello,

We have this template in which the vba-code for spelling in a protected
document is used. (I got it through the MVP-site).
http://word.mvps.org/FAQs/MacrosVBA/SpellcheckProtectDoc.htm
However, now we get an error concerning a certain part of the code.
The part of the code is:

If FmFld.Range.SpellingErrors.Count > 0 Then
'the following condition is to allow for a Word97 bug, which........

The error I get is:
Error 4198 - command failed ("opdracht mislukt" in Dutch)

When I use the debug option, The IF part stated above is selected. When I
hold my mousepointer on 'FmFld.Range.SpellingErrors.Count' it says that it's
value is '0'

It seems that the error always occurs in the same formfield.

We work with Office97 SP2b on a Citrix Metaframe environment.

Thanks for any help.

Rinze Smit
Revalidatie Friesland
 
C

Chuck

Someone else may have a better idea of what might be causing your problem,
but I'd have a few questions:

When you say the "if part" is selected by the debugger, do you mean that
specific line or are more than one line highlighted?

Are there in fact no spelling errors in that field? What happens when you
intentionally introduce a spelling error in that field -- does the code still
raise an error?

I'm wondering if the error you're getting might be related to some other
part of the code -- for instance have you tested whether Call
Word97TableBugWorkaround(FmFld) is being called and if so is it executing
correctly?

Chuck
 
R

Rinze Smit

Chuck,
Thanks for your reply.

only the specific line is highlighted, and there are no spelling errors in
that field. I know that for sure, cause the field is empty.
I've indeed try to make a spelling error in that field and then it first
gets the error and passes on to the next field. There the error occurs
again.
Now I've made a typingerror in the second field. After changing this error,
the spellingcontrol ends OK.

I've even tried to rebuild the formfield. However the same problem occurs.

The Word97TableBugWorkaround(FmFld) is being called and being executed OK in
other formfields with multiple paragraphs, which are not the formfields that
cause the error.

Rinze Smit
Revalidatie Friesland.
 

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