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.
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.
Jacques, Thanks for your suggestion. Setting a password sounds like a viable solution.
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.
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
By Stan Brown in forum ASP.NET
Last Post: 02-13-2010, 09:49 AM
By XAimeElle in forum .NET
Last Post: 09-08-2009, 07:02 PM
By Nick Hall in forum ASP.NET
Last Post: 01-23-2003, 11:53 AM
By David in forum ASP.NET
Last Post: 08-26-2002, 09:16 AM
Last Post: 07-05-2001, 04:10 PM
Tags for this Thread
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center