Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best way to initalize Word97 from VFP6?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00156542
Message ID:
00156557
Views:
37
>I have been trying to make calls to Word97 with limited success with the following code:
>
>oWord = NewObject( "Word.Application" )
>oWordDoc = NewObject( "Word.Document" )
>
>oWord may return an invalid object if Word is for some reason already running.
>
>What is the most bullet proof method to call and validate the proper instantiation of Word 97?
>
>Thanx

before executing, you could:
if vartype(oWord) = "O" and !isnull(oWord)
   if oWord.Name = "Microsoft Word"
      *** then you have a Word object instanciated
   else
      *** whatever here
   endif
else
   oWord = NewObject( "Word.Application" )
endif
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform