View Single Post
  #13   Report Post  
Posted to microsoft.public.word.docmanagement
Dorothy Dorothy is offline
external usenet poster
 
Posts: 17
Default spell check in protected forms

You are amazingly patient. Thank you.
I got this message:
Private Sub CheckProtectedSection(oSection As Section)
debug the run again -- run time error 5825 "object has been deleted
For Each FmFld In oSection.Range.FormFields debug and run again and get
"compile error - syntax error.

then it goes back to the last hightlighted line
For Each FmFld In oSection.Range.FormFields

From the user perspective, the spell check still does not work.




"Bear" wrote:

Dorothy:

It might help if you watched what was happening as you ran the macro.

To do that, open the macro window (press Alt + F11). Now find the macro, and
put the cursor in the first line, the Sub RunSpellCheck(), and press F9. This
should insert a break point at the beginning of the macro, as shown by the
brown dot beside that line.

Whenever the macro is called to run, it will get to that point then enter
debug mode so you can control execution line by line.

If you have two monitors, put the macro window (this is called the VBE -- I
think for visual basic environment) in one monitor and the document in the
other. If you only have one monitor, tile the VBE and the document either
vertically or horizontally so you can see both at once.

Now attempt to run the macro as the user would from the document. When the
macro stops with the first line highlighted, switch to the VBE window (by
clicking the title bar) then step though the macro one line at a time by
pressing F8 to execute each line.

As you go along, see what's happening in the document, or where the macro
encounters trouble.

Bear
--
Windows XP, Word 2000