A timing thing - ??

R

rich_s

Hello!
Things are going well in developing some complex forms with managed code -
with only one exception.

I'm using a custom Submit done with code in the OnSubmitRequest event
handler. Users will be in a disconnected mode at various field locations when
the submit takes place. Managed code copies the XML form to a local directory
along with a Web version (.MHT). The code requires that the form must be
digitally signed before the submit (or printing of the form) can take place.
Here's my problem:

If the form is not digitally signed when submit is clicked, a dialog box
appears asking the user if she/he wants to sign the form before submission
(which must happen in these forms). When the Yes answer is clicked, Infopath
walks the user through the digital signing process. At the end of this
process, control returns to the OnSubmitRequest sub where an error occurs
when trying to export to the .MHT file:

The dialog box says "Infopath cannot submit the form" . Clicking "Show
details" on this dialog displays the following error:
InfoPath cannot execute any view-related object model calls. The view is not
ready.

If submit is clicked again, the submit is always succesful. Same thing
applies to completing the digital signing before clicking submit the first
time.

There is no "thisApplication.DoEvents" to settle things down before doing
the "thisXDocument.View.Export" and moving steps around within the Sub has
had no effect.

Any thoughts??

Thanks for your time and any responses!

Rich Schulthess
Innovative Solution Builders
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top