Einzelnen Beitrag anzeigen

Ykcim

Registriert seit: 29. Dez 2006
Ort: NRW
811 Beiträge
 
Delphi 10.4 Sydney
 
#9

Re: Allgemeine Pfadangabe unter Delphi

  Alt 30. Dez 2006, 00:48
Okay, okay, ich habe es geschnallt...

Ich hätte doch mal 5 Minuten länger über die Antwort von 3_of_8 nachdenken sollen.

Hier die Lösung:

Delphi-Quellcode:
procedure TForm1.BerichtNeuClick(Sender: TObject);
var
Template: OleVariant;
Pfad:string;
begin
Pfad:=ExtractFilePath(ParamStr(0));
Template:=(Pfad+'Main.dot');
if wordapplication1.Visible=true then
WordDocument1.ConnectTo(WordApplication1.ActiveDocument)
else
wordapplication1.Connect;
wordapplication1.Visible:=true;
wordapplication1.Documents.Add(Template,EmptyParam,EmptyParam,EmptyParam);
end;
Vielen Dank für die Hilfe.

Ykcim
Patrick
  Mit Zitat antworten Zitat