Word 2003 not releasing hooks into old version after using 'Save A

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to run some coed I originally wrote for Word2k. The code calls
the save as command to save the currently open document with a new name to a
new location and then deletes the old version. In word 2003 even after doing
the rename I cannot delete the old version because Word 2003 still has it
locked. I get this error even when I do a manual 'Save As' and then go
through explorer while word is till open and try to delete the old version.

Any ideas on how I can solve this problem?

Thanks

Ken M
 
Hi Ken,

Have you closed the old file? If not then Windows may
still see it as being 'in use' through a left over temp file.
http://support.microsoft.com/kb/89247/EN-US/?FR=1

========
Hi,

I am trying to run some coed I originally wrote for Word2k. The code calls
the save as command to save the currently open document with a new name to a
new location and then deletes the old version. In word 2003 even after doing
the rename I cannot delete the old version because Word 2003 still has it
locked. I get this error even when I do a manual 'Save As' and then go
through explorer while word is till open and try to delete the old version.

Any ideas on how I can solve this problem?

Thanks

Ken M>>
--
Let us know if this helped you,

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

Office 2003 Editions explained
http://www.microsoft.com/uk/office/editions.mspx
 
Hi Bob,

That is part of the problem, I can't close the old file because there are no
longer any references to it, but Word still has it locked.

Scenario:
Original document is named Orig1.doc and is located in c:\dir1
in the code Application.ActiveDocument points to c:\dir1\orig1.doc

Then I call
ActiveDocument.SaveAs FileName:="c:\dir2\new1.doc

Now ActiveDocument points to c:\dir2\new1.doc

There are no references to orig1.doc, no way to close it, no indications
that it is still open except in explorer where it still has the temp file,
but when I attempt to delete orig1 it says "permision denied" because Word
still has the file locked.

Ideas?

Thanks,

Ken
 
Back
Top