I have the module from one of my previous posts working, but I am still having trouble with runtime error 642 when I try to run the module more than once from within the same database session. A little history:
Previously I had this as two separate subs and the second one was frequently hanging. As a workaround, I combined the two and used the same instance of New Word.Application rather than two instances. I played around with various configurations and was still running into this error. With everything combined into one sub, it runs fine the first time, but stalls if I try to rerun it. I know it has something to do with the New keyword but haven’t been able to find a solution. The second time around, when it fails, I always find a hidden instance of Word in the task manager which wasn’t there before I start running it the second time.
I assume I have something not quite right in the syntax or in killing the Word App.
Thanks