Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Textübergabe an Microsoft Word 2003 (https://www.delphipraxis.net/57155-textuebergabe-microsoft-word-2003-a.html)

Amateur2005 16. Nov 2005 15:58


Textübergabe an Microsoft Word 2003
 
Hi ich habe jetzt ein programm geschrieben was Word öffnet und eine neue Seite erstellt.
Wie kann ich ihm jetzt befehlen das da zum beispiel in der 2.Zeile "Hallo" schreiben soll mit Scriftgröße 12. Ich währe sehr dankbar!

Ich benutze Delphi 6 Enterprise

Das ist mein jetziger Quelltext:



unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Word2000, OleServer, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
WordDocument1: TWordDocument;
WordApplication1: TWordApplication;
WordFont1: TWordFont;
WordParagraphFormat1: TWordParagraphFormat;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
Form1.WordApplication1.Connect;
Form1.WordApplication1.Visible := true;

end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Form1.WordDocument1.Activate;

end;

end.

Keldorn 16. Nov 2005 21:19

Re: Textübergabe an Microsoft Word 2003
 
Du hast 20.06 hier geschrieben, das alles geklappt hat. WARUM schreibst du das auch nicht hier? :roll:

Mfg Frank


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:50 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 by Thomas Breitkreuz