Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Delphi Exception: EOIESysError: Schnittstelle nicht unterstützt (https://www.delphipraxis.net/200986-exception-eoiesyserror-schnittstelle-nicht-unterstuetzt.html)

delphicoder123 13. Jun 2019 15:26

Exception: EOIESysError: Schnittstelle nicht unterstützt
 
Hallo,
der "EOIESysError: Schnittstelle nicht unterstützt" Fehler tritt nach Ausführen dieser Zeile auf(Zweiter Absatz, letzte Zeile)

olecontainer2:
FContainer.DoVerb(ovShow);

Wie behebe ich diesen Fehler?


Code:
procedure TForm1.FormActivate(Sender: TObject);
var
  FDocument, FWord:Variant;
  FContainer: TOleContainer;
begin
  FContainer := TOleContainer.Create(olecontainer1);
  FContainer.Modified := false;
  FContainer.Parent := olecontainer1;
  FContainer.Align := alClient;
  FContainer.CreateObject('Word.Document', true);
  FDocument := IDispatch(FContainer.OleObject);
  FWord := FDocument.Application;
  FContainer.DoVerb(ovShow);

  // olecontainer2
  FContainer := TOleContainer.Create(olecontainer2);
  FContainer.Modified := false;
  FContainer.Parent := olecontainer2;
  FContainer.Align := alClient;
  FContainer.CreateObject('Excel.Application', true);
  FDocument := IDispatch(FContainer.OleObject);
  FWord := FDocument.Application;
  FContainer.DoVerb(ovShow);

  FContainer := TOleContainer.Create(olecontainer3);
  FContainer.Modified := false;
  FContainer.Parent := olecontainer3;
  FContainer.Align := alClient;
  FContainer.CreateObject('Word.Document', true);
  FDocument := IDispatch(FContainer.OleObject);
  FWord := FDocument.Application;
  FContainer.DoVerb(ovShow);

  FContainer := TOleContainer.Create(olecontainer4);
  FContainer.Modified := false;
  FContainer.Parent := olecontainer4;
  FContainer.Align := alClient;
  FContainer.CreateObject('Excel.Application', true);
  FDocument := IDispatch(FContainer.OleObject);
  FWord := FDocument.Application;
  FContainer.DoVerb(ovShow);


end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:29 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz