Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
40 Points
9 Posts
Oct 16, 2006 11:20 PM|LINK
I tried all different suggetions on internet, but still cannot delete the document (see code below). Can somebody please help? It blocks a major project I am working on.
Thanks
-Jason
faxMODIDocument.Close(false);
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(faxMODIDocument);
System.Runtime.InteropServices.Marshal.ReleaseComObject(faxMODIDocument);
System.Runtime.InteropServices.Marshal.ReleaseComObject(images);
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(images);
faxMODIDocument = null;
images = null;
GC.Collect();
System.IO.File.Delete(fileName); //Exception still thrown - file being used.
jasonxue
Member
40 Points
9 Posts
Re: MODI - Cannot delete file after document closed
Oct 16, 2006 11:20 PM|LINK
I tried all different suggetions on internet, but still cannot delete the document (see code below). Can somebody please help? It blocks a major project I am working on.
Thanks
-Jason
faxMODIDocument.Close(false);
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(faxMODIDocument);
System.Runtime.InteropServices.Marshal.ReleaseComObject(faxMODIDocument);
System.Runtime.InteropServices.Marshal.ReleaseComObject(images);
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(images);
faxMODIDocument = null;
images = null;
GC.Collect();
System.IO.File.Delete(fileName); //Exception still thrown - file being used.