Einzelnen Beitrag anzeigen

mmw

Registriert seit: 10. Sep 2019
Ort: OWL
322 Beiträge
 
Delphi 11 Alexandria
 
#11

AW: Wordautomation Zeilenabstand einstellen

  Alt 7. Jul 2021, 17:56
hallo,
als Beispiel

Delphi-Quellcode:
procedure TForm50.Button1Click(Sender: TObject);

var myword:word_tlb._application;
    mydocument,
    myvisible,
    mysavechanges,
    mytemplate,
    newtemplate,
    mydokumenttype,
    myorginalformat,
    myRouteDocument:Olevariant;

begin

  myword:=Word_TLB.CoWordApplication.Create;

  mytemplate:='Normal';
  newtemplate:=False;
  mydokumenttype:=wdNewBlankDocument;
  myvisible:=True;

  mysavechanges:=wdDoNotSaveChanges;
  myorginalformat:=wdOriginalDocumentFormat;
  myRouteDocument:=False;

  try

   myword.Documents.Add(mytemplate,newtemplate,mydokumenttype,myvisible);

   myword.Visible:=True;


   // myword.Quit(mysavechanges,myorginalformat,myRouteDocument);

  except

  end;
end;

hier ist eine gute Erklärung


[URL="https://www.delphi-treff.de/tipps-tricks/comoledde/andere-office-anwendungen/excel-mit-ole-automation-steuern/"]https://www.delphi-treff.de/tipps-tricks/comoledde/andere-office-anwendungen/excel-mit-ole-automation-steuern/[/URL]


Gruß
  Mit Zitat antworten Zitat