General information
Category:
Coding, syntax & commands
Title:
File Protect using Word Automation
I need to protect a document created using Word Automation. Users should be able to view the document but not be allowed to make any changes to it. I don't want to allow them to open it as read-only and do a File, Save As either. I have tried the following but receive 'ToolsProtectDocument statement is currently disabled.'
THISFORM.oWord.ActiveDocument.PROTECT(2,.F.,"password")
When I open the document in Word, and select Tools, Protect Document, Protect Document for; Tracked Changes and Comments are both enabled and selectable. However, Forms is disabled. Can anyone let me know how to enable the Forms option using automation?
I have tried using THISFORM.oWord.ActiveDocument.UNPROTECT and was informed that the file was not protected.
I am working with VFP6.0 and '98. I have the same results when trying this with VFP7.0 and '98.
Thanks for your help!
Kathy
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only