Hi
I open a document with
WordApplication1.Connect;
WordApplication1.Documents.OpenOld(FileNameOLE,EmptyParam,EmptyParam,EmptyParam,
EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam);
WordApplication1.Visible:=true;
and I want to save it to a stream after it is closed but I get cannot open file used by another process error. What to do ? thanks for help.
sample
procedure TPatient.WordApplication1Quit(Sender: TObject);
var mem:TMemoryStream;
begin
WordApplication1.Disconnect;
WordApplication1.Quit;
//I get filename to global widestring variable File_OLE
mem:=Tmemorystream.Create;
mem.LoadFromFile(File_OLE); -------->>>>error here
mem.Position:=0;