Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Allow user to modify a Word document?
Message
From
12/01/2009 14:36:57
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01372571
Message ID:
01372916
Views:
34
I'm hoping to PREVENT him from closing Word.

In your handler class that implements the ApplicationEvents2 interface:
PROCEDURE ApplicationEvents2_DocumentBeforeClose( toDoc AS VARIANT, tlCancel AS LOGICAL) AS VOID
  IF NOT This.lOk2CloseWord
    tlCancel = .T.
  ENDIF 	
ENDPROC
You have to set the lOK2CloseWord flag to .T. right before you call its Quit() method. You can get rid of all the other flags in my sample code in WordWrapper.prg.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform