C
colin.steadman
I've created an automated template that reads a list of employee
numbers from a text file and splits them into an array. It then loops
though the array and uses a number of functions and SQL calls to build
up a standard document. When all the data has been collected it uses
this code to save the document to a file:
ActiveDocument.SaveAs FileName:=EMPLOYEE_NUMBER & ".doc",
AddToRecentFiles:=False, FileFormat:=wdFormatDocument
This all works perfectly, but I've jut noticed that although only the
last document to be created is available in Word, there are all these
~$nnnnnn.doc in the save directory (presumably temp files).
How can I close/disconnect these file when I save each document as I
presume they are taking up resources and the real job will involve
thousands of employees, not just the hundred or so I'm testing with.
Thanks,
Colin
numbers from a text file and splits them into an array. It then loops
though the array and uses a number of functions and SQL calls to build
up a standard document. When all the data has been collected it uses
this code to save the document to a file:
ActiveDocument.SaveAs FileName:=EMPLOYEE_NUMBER & ".doc",
AddToRecentFiles:=False, FileFormat:=wdFormatDocument
This all works perfectly, but I've jut noticed that although only the
last document to be created is available in Word, there are all these
~$nnnnnn.doc in the save directory (presumably temp files).
How can I close/disconnect these file when I save each document as I
presume they are taking up resources and the real job will involve
thousands of employees, not just the hundred or so I'm testing with.
Thanks,
Colin