No that doesn't work. The problem is that the modal COM call blocks even a timer from firing. While VFP is in a COM call the Windows message queue mostly (with the exception of refresh events of some sort I believe) stops.
No Fox code runs... even in the 'background' since the VFP main thread is effectively tied up by the COM call.
This may work with FoxPro modal windows, but it won't with COM objects.
+++ Rick ---
>>Hi Yuri, thanks...
>>
>>I thought of that already, but unfortunately the dialog is modal so it pops up and blocks VFP. So there's no way to do this sort of activation - I even tried it off a timer with no luck - completely blocked...
>>
>>Hmmm... but I wonder if it might work to force Word to the front beforehand. VFP always wants to be on top of the whole window stack when it loads COM objects, so maybe this will work to bring Word and the Spelling dialog with it to the front... will check out later.
>>
>>Ultimately using Word for spell checking is probably a bad idea anyway...
>>
>>+++ Rick ---
>>
>
>Rick,
>
>I understand: the dialog is modal, and it blocks VFP application where it was called from. The dialog requires user input, and user is expected to close the dialog.
>Thus, one cannot activate the dialog from that VFP application(1) if the dialog is already open.
>
>However the separate another application(0) containing a timer trying to activate the window with particular title/caption, this application(2) should do the trick.
>Application(2) should be called in advance, before the user dialog is called from the application(1).
>
>Actually I am using similar approach on regular basis in situations like closing unexpected Outlook or Windows messages and dialogs.
>
>Other than that, I do not know what do you want to do exactly, and whether you need user to be involved. As an alternative, the Word also provides the way to collect spelling suggestions for particular word, like:
>
>
>oSuggestions = oWord.GetSpellingSuggestions("abc")
>FOR EACH oSuggestion in oSuggestions
> ?oSuggestion.Name
>ENDFOR
>
>
>Probably you could use it too.
>
>
>Good Luck