smaram1
asked on
WINWORD.EXE not closing after mWordObject.ActiveDocument.PrintOut()
I have a requirement where i need to print set of documents and this is working fine. But all the WINWORD.EXE's for each document are staying in Task Manager and i have to manually end all the processes.
Please let me know how to overcome this. If i do this
mWordObject.Application.Qu it()
mWordObject = Nothing
It closes the WINWORD.EXE but it closes even before it prints. I want to know if there is a method which can find when the printing is done and then closes the WINDWORD.EXE files.
Any help/suggestions would be really helpful.
Thanks
Sureshj
Please let me know how to overcome this. If i do this
mWordObject.Application.Qu
mWordObject = Nothing
It closes the WINWORD.EXE but it closes even before it prints. I want to know if there is a method which can find when the printing is done and then closes the WINDWORD.EXE files.
Any help/suggestions would be really helpful.
Thanks
Sureshj
Hi smaram1,
Try the following:
mWordObject.ActiveDocument .PrintOut( )
Do While objWord.BackgroundPrinting Status > 0
Loop
mWordObject.Application.Qu it()
mWordObject = Nothing
Let me know if that doesn't work.
Cheers!
Try the following:
mWordObject.ActiveDocument
Do While objWord.BackgroundPrinting
Loop
mWordObject.Application.Qu
mWordObject = Nothing
Let me know if that doesn't work.
Cheers!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
mWordObject.Application.Qu
mWordObject = Nothing