Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

New Post: Can't delete file after renaming due to Word file handle still present

$
0
0
Hi All,

I have some code that allows the user to open a file, edit it, then save it with a new name (SaveAs). The code saves the file with the new name & then deletes that older file.
This code used to work properly on Word 2003 & 2007, but not 2010 BEFORE I switched to NetOffice.

On Word 2010, the code fails at the delete function because the newer version of word is not dropping the file handle from the first named file when user saves it to the new filename. In older versions (2003 & 2007) this handle was released as soon as file was saved to a different name. Using NetOffice, the problem now occurs with all versions.

I can't seem to figure out how to release the old document filename so the old document file can be deleted.

Any ideas?

Thanks & regards,

Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>