Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How does the Gen field edit disable saving of Word docs?
Message
From
03/04/2001 21:46:34
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
How does the Gen field edit disable saving of Word docs?
Miscellaneous
Thread ID:
00491659
Message ID:
00491659
Views:
65
Suppose I have a general field connected (I don't think it matters if it's embedded or linked) to a Word document.

I've noticed that when you 'Edit' the field, it opens up Word with all of the File menu Saving and Printing options disabled....And ending the Word session using the cancel button bops you back to VFP.

This is really cool. Sure wish I knew how to do the same thing programmatically with OLE, but after some considerable searching in Word VB help and AutoFOX I have not been able to find out how to disable individual menu commands.

My goal is to open up a document in print preview mode and to disallow the document from being saved, saved as...etc. But I would still like to be able to allow it to be printed.

In our plant, we'd like certain employees to be able to print a controlled document, but not easily have a way of printing a modified version of the controlled document. I'd also like to be able to allow the employees to view the document in print preview mode for those occasions when they do not need hard copy.

Problem is, if I use OLE to open up a copy of the document, then put it in print preview mode, the user can easily switch to an editing view, do a saveas, and thereby create an uncontrolled bootleg version of the document which can be edited and used in lieu of a legitimate, controlled version.

(I think) disabling save options would make it much more difficult to produce an editable version of the document, and would thereby discourage the occasional temptation to violate document control protocol to satisfy some expediency. I'm not really trying to defeat a determined, knowledgeable hack. Just trying to eliminate an easy way to break the rules so that people are encouraged to follow protocol even when it's a little inconvenient.
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Next
Reply
Map
View

Click here to load this message in the networking platform