Page 1 of 1

Exel wird nicht sauber beendet.

PostPosted: Thu Jan 03, 2008 3:32 pm
by ukoenig
Hallo, aus Essen

hat jemand eine Lösung um Excel zu schließen ?
Mit dem neuen Win32Ole funktioniert das alte
oExcel:End() nicht mehr.
Die Information von Antonio : oExcel := NIL
funktioniert ebenfalls nicht.
Excel ist zwar anschließend unsichtbar und es erfolgt
kein Absturz, aber im Taskmanager sind die Instanzen
immer noch offen.

Danke
U. König :lol:

PostPosted: Thu Jan 03, 2008 4:58 pm
by Timm Sodtalbers
Hi!

Hast du es schon mit oExcel:Quit() probiert?

PostPosted: Sun Jan 06, 2008 9:05 pm
by NK
Hallo,

ich hab das Problem auch immer. Noch schlimmer ist es bei Word, da er dann immer mit "normal.dot speichern" kommt.

Ich rufe jetzt immer vor einem neuen Excel oder Word-Start immer nachfolgende Routine auf.
Code: Select all  Expand view
FUNCTION CLOSEWINWORD()

   LOCAL hWnd := GetWindow( GetDesktopWindow(), GW_CHILD )

   WHILE hWnd != 0
      IF GetWindowText( hWnd ) = "Microsoft Word" // oder Microsoft Excel
         PostMessage( hWnd, WM_CLOSE )
         RETURN .T.
      ENDIF

      hWnd = GetWindow( hWnd, GW_HWNDNEXT )
   ENDDO

   RETURN .F.


Vielleicht hilft es.

Gruss, Norbert