Results 1 to 1 of 1
2002-03-07, 20:07 #1
- Join Date
- Feb 2001
- Yilgarn region of Toronto, Ontario
- Thanked 0 Times in 0 Posts
Frequent Saves - *.tmp files (Word97/sr2)
I know that you all know that we know where those *.tmp files come from - they're left over after Word has crashed, right?
Well I added something to my knowledge today - I had, for once, a non-maximised window as Word/VBA ran through a table of file names. I'd inserted code to save my table every 5 files (I get a file name from the top row, process that file, then cut/paste the row to the foot of the document).
I also happened to be staring at Explorer in the host directory. There I saw a list building up....
<pre>~WRL2569 TMP 43,520 03-07-02 2:49p ~WRL2569.tmp
~WRL3266 TMP 44,544 03-07-02 2:50p ~WRL3266.tmp
~WRL3152 TMP 44,032 03-07-02 2:50p ~WRL3152.tmp
Trouble is, if Word crashes, they are all left there, of course, and they are Hidden files (I cannot see them with DIR, but can see them with DIR /AH)
So, a caveat of some sorts is be-aware if your application performs frequent saves.
I suppose the same applies to those Word users who maintain that Tools, Options, SaveAutoRecover every 1 minutes is a good idea.
Here's the skeleton of the loop:
<pre>Function lngProcessKitFiles(strFilesDocName As String) As Long
While (lngProcessKitFiles > 0) And (Selection.Information(wdWithInTable))
(do some interesting stuff in here)
Dim intSaveEvery As Integer
intSaveEvery = intSaveEvery + 1
If intSaveEvery >= intcSaveEveryDefault Then ' default is '5'
intSaveEvery = 0 ' reset counter
Documents(strFilesDocName).Save ' save the table of files