Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Automatisierung einer SPEZIFISCHEN Word-Instanz bei Vorhandensein mehrerer Instanzen (https://www.delphipraxis.net/205463-automatisierung-einer-spezifischen-word-instanz-bei-vorhandensein-mehrerer-instanzen.html)

Bernhard73 14. Sep 2020 21:17

AW: Automatisierung einer SPEZIFISCHEN Word-Instanz bei Vorhandensein mehrerer Instan
 
Hallo Uwe,

DANKE! Ja, so funktioniert's tatsächlich...erfreulich unkompliziert!

Delphi-Quellcode:
uses Word2010;

procedure TForm1.Button1Click(Sender: TObject);
var wrdApp : _Global;
    wrdDoc : _Document;
    target : _Application;
begin
  wrdApp:=CoWordGlobal.Create;
  wrdDoc:=wrdApp.Documents.Item('C:\Temp\nx-434557890dfad323a44.doc');
  wrdDoc.Activate;
  target:=wrdDoc.Application;
  target.Selection.TypeText('HALLO!');
end;
Herzlichen Dank an alle, die sich Gedanken gemacht haben! :)

Bernhard


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:54 Uhr.
Seite 2 von 2     12   

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