Spellchecker - modal or modeless

R

Roderick O'Regan

I have a document which is always protected. A useform r will be
called to make changes within the document.

The userform unlocks the document, applies the changes, relocks the
document then clears itself. So far so good.

Now the client asks me to incorporate spellchecking into the document.
In the normal course this is not possible as the document is
protected.

If I then create a procedure to unlock the document and call the
spellchecker it might work OK. But as the checker has a modeless
property (Am I using correct terminology here?) the user can click on
the document, make any bizarre changes then return to the
spellchecker.

So, is there a way of making the spellchecker have a modal property,
please?

And if by some chance this is possible, how is the document
automatically re-protected again when the checker is closed?

Or is it a hopeless case in this instance and therefore tell the
client "Sorry, no can do"?
 
H

Helmut Weber

Hi Roderick,

if you call the dialog from code,
it'll be modal anyway.
This maybe the case with all dialogs invoked by code.
But I'm not sure.

Sub Macro11()
Dim oDlg As Dialog
Set oDlg = Dialogs(wdDialogToolsSpellingAndGrammar)
' unprotect
oDlg.Show
' protect
End Sub

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
R

Roderick O'Regan

I didn't know that dialogs called from code are modal. Thanks for the
information.

And the code worked as required too. Just moved the Set line down one
and all was well.

Thanks again Helmut

Roderick
 

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