Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Work with only one Instance of Word
Message
From
21/05/2002 08:29:06
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00658782
Message ID:
00659286
Views:
38
>But if that's not possible, I should do something like
>
>
>IF VARTYPE(oWord) = "U" .OR. VARTYPE(oWord) = "X"
>   oWord = CREATEOBJECT("Word.Application")
>ENDIF
>oDoc = GetObject(lcDocument)
>oWord.Visible = .T.
>
>That looks like it would work, but it appears to still create two instances of WINWORD and the second one doesn't open my second document.
>

Is there a reason you can't just store your reference to Word somewhere and check it when you need a reference. I usually use a property of the form or object I'm working with and store my Word reference there. Create it the first time I need and, typically, close it on the way out.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform