PDA

View Full Version : Prevent Opening Another Document?



let98007
06-30-2009, 09:33 PM
Is it possible to prevent a user from opening another document or creating a new one while s/he is editing?

fumei
07-02-2009, 11:48 AM
Yes, for your average-type user this can be done fairly easily. However, any really knowledgeable Word user could get around it.

Why do you want to do this? In general, I am opposed to restrictive changes To Word. What is the business case for such a restrictive condition?

let98007
07-02-2009, 09:35 PM
I have an automation process running. I want to expose the current document for the user to proof and modify if needed before resuming automation. Opening other documents could confuse or derail the automation task. Also, there is no need for other documents at that time.

I actually succeeded in this task by implementing an Eventhandler using the ApplicationEvents2 interface. I can't prevent the document from opening but I can notify the user and close the extra document immediately so the automation process is able to run to conclusion.

Thanks for your response!

fumei
07-06-2009, 09:02 AM
It may help others if you posted your solution using an EventHandler.