Every time a user clicked on the UI, you'd get that beautiful dialog "This application cannot be completed because the other application is busy. Choose 'Switch To' to activate the busy application and correct the problem.
This is particularly onerous because if the user does not click switch to, basically, both programs, the VB6 app AND the Office app sit around waiting for the user to do something. Yay!
Luckily I found the quick and dirty answer to this. Somewhere... Anywhere before the point that you make the COM call, just insert these two lines:
App.OleRequestPendingTimeout = 2147483647
App.OleServerBusyTimeout = 2147483647
... and you never have to see that dialog again.
Enjoy!
1 comment:
Is there similar function or property in .Net.
I am facing same problem in C# window form when I am trying to save a huge word document
Post a Comment