I have an application that creates a word file and then interacts with it through bookmarks. Is there any way to create this file so that the user cannot close it through word? I would like to have the VB program have control over opening and closing the file. Thanks in advance for any assistance.
11-23-2010, 07:57 PM
You could set a password on the document.
I am in working from an hotel room and do not have access Word right now, but I kind of remember that there is a parameter to set the password on the Save and/or SaveAs method of the Word.Document class.
There is also a parameter to specify the password when reopening the document on the Open method of the Word.Documents collection.
Only your application and users who know the password (such as yourself), will then be able to use the document.
11-24-2010, 10:27 AM
Jacques, Thanks for your suggestion. Setting a password sounds like a viable solution.
11-25-2010, 08:51 AM
Just keep in mind that anyone that knows the password can change the password, so I would suggest always keeping an update to date backup of the document.