Problem with Excel Macro using WINWORD.exe
Posted by M. Kilkelly on June 04, 2001 12:41 PM
I have an auto_open macro that I use to automatically format the printer setup once a worksheet is opened. I am creating an instance of the Word.application object to use the PrivateProfileString function to write the print configurations to the printer's .ini file. This macro is used as part of a system that automatically foramts and prints Excel files whenever they are uploaded to a certain directory.
The problem that I'm having is that whenever this macro is run, a WINWORD.exe process is created but it is not recycled when Excel is closed. If ten documents are uploaded, then I have ten instances of WINWORD.exe running, which is tieing up a lot of resources and giving me "out of memory" errors.
Does anyone know of a way force the macro to terminate the WINWORD processes after the marco is run? Thanks.