Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File Protect using Word Automation
Message
From
10/06/2003 12:04:09
Kathy Wilson
Naval Surface Warfare Center
Crane, Indiana, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
File Protect using Word Automation
Miscellaneous
Thread ID:
00798443
Message ID:
00798443
Views:
250
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
Map
View

Click here to load this message in the networking platform