>>>>Thank you very much Dragan. Now I'm really scared of automation... as I should have been to start with ;-)
>>>
>>>I've learned, on my own self, that it's not good for your hair, teeth and nerves.
>>>Ah, did I forget the phantom dialogs that appear behind every other window, don't appear on the taskbar, and you can access them only by alt-tabbing, if you remember to try that. Until then, the app plays dead, Word is invisible, the dialog is also kind of invisible behind all those other windows, and waits patiently for you to return focus to it and click ok or cancel.
>>>
>>>That particular phantom took a few days to catch, and several more days to avoid. Not fix, avoid. Can't be fixed, as it's not exposed through COM.
>>
>>Strangely enough, we never had this problem after setting loWord.DisplayAlerts = .F.
>
>We may have got a different value of never... That is, this setting worked fine until a certain version of Word, when there appeared a new dialog which wasn't of the same class. You probably never did the thing that would cause that dialog to appear.
That is correct, early on we realized that versions could cause problems, so we tried to limit the use to the absolute necessary functionality. But I must say we never really had a lot of problems, except the ones we created ourselves. The biggest issue we had was, that the original developer (back in the 90s) created the code using recorded VBA macros in Word, and with that copied the "Selection" instead of real range objects, and other places he used the clipboard for the obviously generated Copy() Paste() methods when record a VBA macro in Word. That caused timing issues and other strange side effects, but it was just done wrong.
Christian Isberner
Software Consultant