I am buliding a delphi form to add a new word document in MS Word and wait for the user to insert text and edit document, save the file and exit form MS Word, then get me the file name and path to the file.
WordApp := CreateOleObject('Word.Application');
WordApp.Visible := True;
Doc := WordApp.Documents.add();
wait for user insert text and edit document and save file and exit form MS Word THEN
Doc.Save;
DocName := Doc.Name;
Docpath := IncludeTrailingPathDelimiter(Doc.path) + DocName;
with ZipForge1 do
begin
FileName := Zipfilename;
OpenArchive;
Options.StorePath := spNoPath;
AddFiles(Docpath);
CloseArchive;
end;