Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing Windows...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00309404
Message ID:
00309450
Vues:
24
Hi George,
I do have it looking for 'Microsoft Word', and like I said, it works fine, but if I (the user) closes Word by clicking the top right check box, for example, Word seems to close, but in the task list, 'Winword' is listed. The next time I try to open a Word file, it acts like it found 'Microsoft Word' with your procedure and doesn't issue another oword=create("word.application"), but when it skips the create command and goes directly to the with endwith oword commands, it doesn't recognize oword as being Word. follow me? So Strange.
Is there a command to close that 'Winword' that is listed? To get it out of there? I don't really understand your last suggestion as I'm quite new at this stuff. Thanks so much.




>>Have a lot of automation with Word in my application. I am using George Tasker's is_run32() procedure to see if Word is running, if not, I issue Oword=create("Word.Application"). Works fine for the most part, but at some point if the users close Word themselves, the application thinks it's still open because it is still listed as 'Winword'. (I've been testing all different situations and do a Ctrl, Alt, Del to see the list of running applications, sure enough, when I get an error, Winword is listed). The error comes after is_run32() is run and it Thinks that Microsoft Word is running and tries to work in the 'With OWord Endwith' commands. Word is not running, but does show up in the tasks list. Any ideas?
>
>Hi Mary-Ann,
>
>You might try passing Is_Run32() more information than just "Word". What's happening is that ("WORD" $ "WINWORD") = .T. You could add a space before "Word" or the word "Microsoft". However, that may not be 100% reliable if the server is active but not visible. You can test visibility with:
DECLARE INTEGER IsWindowVisible IN Win32API;
>  INTEGER hWnd
>* lnhwnd is window handle of interest
>llisvisibile = (IsWindowVisible(lnhwnd) # 0)
One more word, I don't know if you've been following Geo's Adventures in OLEAutomationland< g >, but all of the Office 2000 products work considerably different than their counterparts in Office 97. Most specifically is that when a second document is opened, it spawns a new instance of the application. In this case, the references to "Winword" you see are the server and they're not visible.
"Live Well, Laugh Often, Love Much..."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform