Spell Check Macro Error

  • Thread starter Thread starter Guest
  • Start date Start date
I have recently tried to create the macro for spell checking a protected
document in Office 2003. I followed the instructions from the article:
http://www.word.mvps.org/FAQs/MacrosVBA/SpellcheckProtectDoc.htm

When I went to run this macro on a saved document, I received a compile
error: syntax error message.

Sub RunSpellcheck() Is highlighted.

What can I do to fix this?

What is highlighted in the VBA editor when the error message appears?
And is anything in the code colored red?

If you copied the entire macro code in one piece and pasted it into
the editor, the problem is probably the dashed lines between the
subroutines. Just delete them and try running again.

If you laboriously retyped everything, the error could be anywhere.
Don't do that! Copy/paste is much more reliable. The most probable
typing error, though, is omitting the space between the underscore at
the end of a line and the character preceding it (see
http://www.word.mvps.org/FAQs/MacrosVBA/_AtEndOfLine.htm).

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
Thank you Jay. Since I did copy and paste the code, removing the red dotted
lines did the trick.

Thanx
 
Back
Top