Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open Word read/only, prevent save as, release variable
Message
 
 
À
31/07/2007 12:30:45
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01244081
Message ID:
01244917
Vues:
30
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform