Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reporting using Excel, Excel remains open
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00765514
Message ID:
00765926
Vues:
45
Have you ever tried KillExcel ?
I saw it on one of the threads a couple of months ago.

PROCEDURE KillExcel
LOCAL lnHandle , lnIsVisible
DECLARE LONG FindWindow IN WIN32API ;
STRING lpClassName, STRING lpWindowName

lnHandle = FindWindow( "XLMAIN", NULL )

IF lnHandle > 0
DECLARE LONG IsWindowVisible IN WIN32API LONG hwnd

lnIsVisible = IsWindowVisible( lnHandle )

IF lnIsVisible = 0

DECLARE LONG PostMessage IN WIN32API ;
LONG hwnd, LONG wMsg, LONG wParam, LONG lParam

PostMessage( lnHandle, 0x10, 0, 0)

*!* WAIT WINDOW "Killed an Excel Instance" TIMEOUT 1
ENDIF
ENDIF
ENDPROC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform