PDA

View Full Version : [SOLVED:] ~!doc1.doc created .. why?



Mr Doubtfire
06-04-2005, 07:22 AM
Please let me know why every time when I create a Word doc from VBA through VB6 ("doc1.doc") I am getting "~!doc1.doc" at the same time. It would dissappear after I open/close "doc1.doc"?
I have closed the object with "Set objApp = Nothing", is it NOT enough!?
Thanks!
:banghead:

MOS MASTER
06-04-2005, 10:41 AM
Please let me know why every time when I create a Word doc from VBA through VB6 ("doc1.doc") I am getting "~!doc1.doc" at the same time. It would dissappear after I open/close "doc1.doc"?
I have closed the object with "Set objApp = Nothing", is it NOT enough!?
Thanks!
:banghead:
Word always creates a tempfile that is about the same size as the opend document. That's design by default an Word needs that to work with the document.

Well The Set alone isn't enough.

If you are creating a Document and a Application Object you need to:


objDoc.Close False
objApp.Quit False
Set objDoc = Nothing
Set objApp = Nothing

So it al comes down to how your code looks and where not seeing that.

Enjoy! :whistle: