Hi Chris,
Yes I did find a solution to this one.
The custom task pane HTML Button was running a line of script like :-
window.external.Window.Extension.C#Method
to call a method in the Form Code for the InfoPath Doc.
The method, ran through its code and finally called
thisApplication.Quit(true), or one of the other close commands.
In the end I moved the line of code that quits infopath out of the C# Method
and into the script on the custom task pane. My script code ended up looking
like :-
window.external.Window.XDocument.Extension.C#Method;
window.external.Window.Close(true);
Running the Close method stops the error on reopen from occurring.
I'm not certain why this fixes it, but my guess is that the call to the
method on the InfoPath form puts a lock on it, and because the context is
never returned back to the script, the lock remains, and when you go to
reopen it, you get the message.
So, perhaps you have another process accessing code in your form, but the
code stops somehow (eg Quit, error, etc) before it can return to the context
of the caller.
Hope this helps a bit.
Cheers,
David.
> Hi David,
>
[quoted text clipped - 41 lines]
> > Thanks,
> > David.