> Hi,
>
> I use CREATEOBJECT("Word.Application") to start Office automation from VFP.
> However, when a user allready has an instance of MS Word open and I close the automation from VFP,
> Word gives a message that the normal.dot file is in use and cannot be overwritten.
> Clearly, the two Word sessions interfere.
>
> To avoid that, I first try GETOBJECT(,"Word.Application"), which connects to an existing Word instance.
> If GETOBJECT() indicates that there is no running instance, you can trap that error and use CREATEOBJECT() instead.
>
> What bothers me, is that when I use GETOBJECT(), there seems no way to know that the Word instance you get access to has a modal dialog open, for example a 'File Open' dialog.
>
> In that case, I can't use that Word instance, because it is not accessible for the automation I want to do.
>
> My question: is there a way to determine that a Word instance has a modal dialop open?
>
> Thanks, Hans
Hans,
you could try to implent in your closing of Word:
oWord.NormalTemplate = .t.
This should do the job for you to answer the question about a changed Normal.dot
Regards,
Koen