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;