Hi, Delpher,
ich verwende den folgenden Code:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:
| try MSWord := CreateOleObject('Word.Application'); except ShowMessage('Word kann nicht gestartet werden!'); Exit; end; msword.documents.open(form1.label30.caption+'OUTTXT\'+dnam); erg := form1.xMessageDlg('Word im Querformat ODER im Hochformat?', mtConfirmation, [mbYes, mbno, mbcancel], ['Quer', 'Hoch', 'Abbrechen'], self.font); case erg of mryes: msword.selection.pagesetup.orientation := 1; mrno : msword.selection.pagesetup.orientation := 0; end; msword.selection.font.size := 8; msword.visible := true; |
Die Formatierung, z.B. pagesetup wird nicht durchgeführt, ich nehme an, weil keine wirksame selection erfolgte. Wie kann ich die denn für das gesamte Dokument erreichen?
Vielen Dank für Hilfe, sagt
Detlef A.
Hab's per Zufall gefunden!! Für Interessierte:
Delphi-Quelltext
1: 2:
| msword.activedocument.select; msword.selection.font.name := 'Courier New'; msword.selection.font.size := 8; |
bis zum nächsten Mal, Detlef