B
Brian
Hi,
I have seen many posts on this problem, but have not found an acceptable
solution...
I am automating word from VB and need to make changes to a document that I
cannot save. My code saves the changes to a new document using 'saveas'.
My problem is that this new file cannot be deleted until I close the word
application object.
I have tried to delete the file using the filesystem-object, the 'kill'
command and even in windows explorer to no avail. How can I get word to
remove its references to this document without closing down the application
object?
the essence of my code is this...
doc1.saveas "somenewfilepath.doc"
doc1.close false
doc2.application.selection.insertfile "somenewfilepath.doc"
kill "somenewfilepath.doc" 'this fails with permission denied error
TIA
-Brian
I have seen many posts on this problem, but have not found an acceptable
solution...
I am automating word from VB and need to make changes to a document that I
cannot save. My code saves the changes to a new document using 'saveas'.
My problem is that this new file cannot be deleted until I close the word
application object.
I have tried to delete the file using the filesystem-object, the 'kill'
command and even in windows explorer to no avail. How can I get word to
remove its references to this document without closing down the application
object?
the essence of my code is this...
doc1.saveas "somenewfilepath.doc"
doc1.close false
doc2.application.selection.insertfile "somenewfilepath.doc"
kill "somenewfilepath.doc" 'this fails with permission denied error
TIA
-Brian