handling InfoPath events like save

Z

zhish

We have information store in an application. Users can click the button to
edit the information in Word or InfoPath based on the content of the
information. When user click the save button from Word or InfoPath, the
application needs to do some processing, like updating the preview pane of
the application, etc.

For Word, this can be done through
Microsoft.Office.Interop.Word.ApplicationClass like the following by hooking
up the DocumentBeforeSave event

Word.ApplicationClass app = new
Microsoft.Office.Interop.Word.ApplicationClass();
object fileName = @"C:\Test\form2.xml";
object missing = Type.Missing;
app.Documents.Open(ref fileName, ref missing, ref missing, ref
missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref
missing, ref missing, ref missing, ref missing, ref missing, ref missing);
app.ApplicationEvents2_Event_DocumentBeforeSave += new
Microsoft.Office.Interop.Word.ApplicationEvents2_DocumentBeforeSaveEventHandler(app_ApplicationEvents2_Event_DocumentBeforeSave);


However, I could not figure out a similar way for InfoPath. Could anyone
please point me to any samples if available or give me some suggestions on
how to move on? Thanks a lot!
 

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