Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open Word read/only, prevent save as, release variable
Message
 
 
To
31/07/2007 12:30:45
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01244081
Message ID:
01244917
Views:
29
>The threads you pointed to required changing the word documentation (by a least adding a password) which I prefer not to do. Thanks for your help.

Well, unfortunately this can not be a good solution:
oWord = createobject("Word.Application")

lcFile = getfile('DOC')
if empty(lcfile)
 return
endif
with oWord
 .Documents.Open(lcFile)
 *.Application.CommandBars("Standard").Controls("Save").Enabled = .F.
 .Application.CommandBars("File").Controls("Save As...").Enabled = .F.
 .visible = .t.
endwith
since we need to be able to restore it back before an attempt to close Word file.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform