Preventing doc closing

A

Adrian

hi All,

Is there a reasonably easy way to prevent a user from
closing a word 2000 doc while code is running?
I want the code to close and save the doc to a specific
location with a specific filename without the user messing
things up?

Thanks for any help

Adrian
 
J

Jezebel

The document won't close while code is actually running: unless you put a
DoEvents in your code, control isn't passed back to the user -- so mouse and
keyboard events aren't acted on -- until your function completes.

If you write macros called FileSave and FileSaveAs, they will run in place
of the built-in functions. You can also trap the DocumentBeforeSave event.
It's hardly rigorous security, but sufficient in a non-adversarial
environment.
 

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