Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word - VBA Automation
Message
 
To
25/01/2001 09:25:05
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00468404
Message ID:
00468415
Views:
19
>Hi all.
>
>I'm trying to Automate word and use it to edit rtf files. The problem I'm having is...once I create the word object and display word...If the user closes
>Word it crases my program. How can i tell if Word is still running.
>
>TIA
>Carl


Vartype, type and isnull didn't work.

But what you can try is make your own function
Function OLEobjectExists
LParameter oRef
Local lcOnError, llError, lcTemp
  lcOnError = On('Error')
  On Error llError = .t.
  lcTemp = oRef.Name && If word doesn't exist anymore, this will set llError to .t.
  On Error &lcOnError
  Return llError
EndFunc
HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform