Enabling spellcheck for protected forms in Word 2003

G

GordonM

I believe that I have followed the instructions in
http://word.mvps.org/FAQs/MacrosVBA/SpellcheckProtectDoc.htm
to attempt to enable spellcheck for a protected form. Unfortunately, I
can't get this to work and Tools/Spelling and Grammar remains greyed-out.

The process I used was to Create a new macro and paste in the code from the
referenced URL, having deleted what Word put inb automatically.

I have also created a very simple .dot file and tried to enable spellcheck
using the same macro, but still Tools/Spelling and Grammar is greyed-out

I note, BTW, that if I delete this macro, I am still told when opening these
files that they contain macros. I don't understand this.

I have run the example on the referenced URL and this works fine.

I am using Word 2003.

Any help much appreciated .... this is my first attempt to use Word macros.

Thank you
Gordon Marwood
 
J

Jay Freedman

Creating the macro doesn't enable the Spelling & Grammar menu item --
as long as the form is protected, that item will *always* be greyed
out. That's why the article, in step 3, tells you to make a toolbar
button or a custom menu item for it. Alternatively, you can assign a
keyboard shortcut to run the macro.

As a separate issue, deleting the macros from a template or document
doesn't remove some of the internal structures that Word creates to
support macros; and it's the presence of those structures that
triggers the "contains macros" message. If you ever really need to get
rid of that message, one way is to save the template or document as an
RTF file, reopen that file, and save it in the original format
(overwriting the original file or using a different file name).

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
G

GordonM

Thank you for the reply. What you are saying would make sense to me except
that, for the example in the referenced URL, when the document is protected,
"Spelling and Grammar" is not greyed out, though many of the other items are.

I am developing this form for the use of several hundred people and I really
don't want them to have to do anything except use the form.

Thank you
Gordon
 
J

Jay Freedman

Hi Gordon,

The sample template from the article is, in a sense, too smart for
your own good. The Spelling and Grammar menu item you see there is
*not* the standard Spelling and Grammar item from the Normal.dot
template. It's a custom menu item that was added to the sample
template. It was given the same wording and icon as the standard item,
and the standard item was removed from the menu. Because these changes
are saved in the sample template, you'll see this behavior only in
documents based on that template.

There are two ways to distinguish the custom item from the standard
item. The first is visual: The standard item includes the F7 shortcut
at the right side of the menu, but the custom one does not. The other
way is to set a breakpoint in the macro, and observe that clicking the
custom item does indeed fire the macro.

The orange words in step 3 of the cited article are a hyperlink to the
article at
http://word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToToolbar.htm,
which explains how to make a custom menu item.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
G

GordonM

Further to my previous comment, I tried an experiment, starting with the
sample document from the URL. With protection turned off, I inserted a
section break at the beginning of the file and then imported my own document.
When the document was protected, Spelling and Grammar was still shown as
active. However, importing the document had messed up the formatting
(specifically, a lot of the lines had acquired 12pt spacing after them). I
removed the text of the sample file, leaving only my document and Spelling
and Grammar still worked. I then set about correcting the formatting.
Somewhere along the way, Spelling and Grammar became greyed-out. I don't
know what caused this. Curious ....

Gordon
 
G

GordonM

I have just tested the
http://word.mvps.org/FAQs/MacrosVBA/SpellcheckProtectDoc.htm example file
with Word 2000 rather than Word 2003 and, for 2000, Jay appears to be
correct. Tools/Spelling and Grammar is greyed-out. This was not the case
with Word 2003 on my machine. I'm still trying to find a solution to
incorporating the macro into my own document but, so far, with no success.
Any other suggestions would be appreciated.

Thank you
Gordon
 
G

GordonM

Looks like there are no more ideas out there as to why the spellcheck macro
won't work for me. If I solve the problem, I'll post the solution, in case
it is of general interest.

Gordon
 

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