in https://stackoverflow.com/questions/8404827/creating-word-document-from-delphi-saving-as-doc-and-as-pdf wird das Format auch als OleVariant angegeben:
var
FileName,
FileFormat : OleVariant;
begin
FileName := AFileName;
FileFormat := wdFormatPDF;
ADocument.SaveAs(FileName, FileFormat ...
Die Suche ergab 3 Treffer
- So 11. Sep 2022, 22:41
- Forum: Windows
- Thema: [gelöst] MS Word OLE .docx SaveAs .rtf/.pdf/.html
- Antworten: 10
- Zugriffe: 8358
- So 11. Sep 2022, 22:30
- Forum: Windows
- Thema: [gelöst] MS Word OLE .docx SaveAs .rtf/.pdf/.html
- Antworten: 10
- Zugriffe: 8358
Re: Word OLE .docx to .rtf
Hier viewtopic.php?p=71501#p71501 hatte jemand Probleme mit Speichern/Überschreiben, evtl. hilft das anstelle von
Code: Alles auswählen
Documents.Add
Code: Alles auswählen
Documents.Open
- So 11. Sep 2022, 17:18
- Forum: Windows
- Thema: [gelöst] MS Word OLE .docx SaveAs .rtf/.pdf/.html
- Antworten: 10
- Zugriffe: 8358
Re: Word OLE .docx to .rtf
möglicherweise mag Word nicht, dass Du ein RTF mit der .docx-Erweiterung abspeichern willst. Ersetze doch mal
durch
Code: Alles auswählen
WordDoc_SaveAs(Path+'Test1.docx', Path+'Test2.docx');
Code: Alles auswählen
WordDoc_SaveAs(Path+'Test1.docx', Path+'Test2.rtf');