Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent Save in Word?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01198988
Message ID:
01205399
Vues:
26
As Harvey points out this might only work in Word 2003
LOCAL oWord
oword = CREATEOBJECT("word.application")
oword.visible = .t.
Declare Integer FindWindow In user32;
 STRING lpClassName, String lpWindowName
Declare Integer GetSystemMenu In user32 Integer HWnd, Integer bRevert
Declare Integer RemoveMenu In user32 Integer hMenu ,Integer nPosition,Integer wFlags
#Define  MF_BYPOSITION 1024
HWnd = FindWindow("OPUSApp", 0)  
hMnu = GetSystemMenu(HWnd, 0)
For I = 6 To 0 Step -1
 Y = RemoveMenu(hMnu, I, MF_BYPOSITION)
Next I
>Could it really be that easy? I hope so... Can't imagine I didn't look at the CommandBars collection before. However, this has been one of those projects that gets my attention for a while until some other firestorm erupts. It might be a couple of weeks or even a month before I get back to it. Not great for continuity.
>
>The other task would be to prevent the user from closing Word via the big red box so I don't lose the reference to the document before it gets printed. Maybe that capability is in there too...
>
>Thanks for the suggestion!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform