Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Word-Komponente (https://www.delphipraxis.net/24146-word-komponente.html)

rbest 16. Jun 2004 09:17


Word-Komponente
 
Hai Gaiis, :)
Habe ein Problem mit der Word-Komponente. Wenn ich ein dokument aufgemacht habe und wenn ich nach dem Schliessen selbiges nochmal aufmachen möchte, kommt die Meldung rpc-Server nicht gefunden (oder so). Das ist mein Code:
Delphi-Quellcode:
    _WordApplication.Documents.Open('Dateixy.doc',EmptyParam,EmptyParam,EmptyParam,
           EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,
          EmptyParam,EmptyParam);
    _WordApplication.Visible := True;
    _WordApplication.Activate;
Im Voraus besten Dank!

Bernhard Geyer 16. Jun 2004 12:20

Re: Word-Komponente
 
Wenn Word beendet wird, so ist dein Interface-Zeiger nicht mehr gültig und damit auch keine Aufruf mehr möglich.

Nimm mal die TWordApplication-Komponente von Delphi. Dort gibt es ein OnQuit-Event, welches Du auswerten kannst, um bei Beenden von Word jedesmal eine neue Wortinstanz zu starten.


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:32 Uhr.

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