InfoPath Auto Exit - InfoPath Dev
in

InfoPath Dev

InfoPath Auto Exit

Last post 10-22-2008 03:34 PM by Harij. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 10-20-2008 07:31 PM

    • Harij
    • Not Ranked
      Male
    • Joined on 10-20-2008
    • Posts 5

    InfoPath Auto Exit

    Hi Guys,

     Can anyone help me with the below issue?  

    Some of you may already know that the InfoPath application remains open after the 'Submit' button is clicked. The form itself closes, but the InfoPath window sits there needlessly. I have made a couple of attempts in my time to resolve this, and to be honest, I have made very little progress.

    Is any way to Close InfoPath Application?

    Any thoughts?

    Cheers

    Hari 

  • 10-20-2008 08:19 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} Hello,

    Here is the code to close the form when user click on button,

    XDocument.View.Window.Close(true);

     
  • 10-20-2008 08:29 PM In reply to

    • Harij
    • Not Ranked
      Male
    • Joined on 10-20-2008
    • Posts 5

    Hi Shiva,

    Thanks for that , but the above code will close only the form.

    I need to close the whole InfoPath application.

    Any thoughts?

  • 10-20-2008 10:19 PM In reply to

    • phamj
    • Top 500 Contributor
      Female
    • Joined on 05-23-2008
    • Australia
    • Posts 26

     I had this problem before - but I think I gave up and decided to use the Rules instead of scripting.

     If you have a button control on your form already just add a rule to Submit to where ever and then a rule for "Close the form"

  • 10-21-2008 11:50 PM In reply to

    Hi Hari,

     You can use the following code for closing the InfoPath Application

    Application.ActiveWindow.Close();

    Thanks,
    Sandhya


  • 10-22-2008 12:26 AM In reply to

    Hi,

    Please use below line of code for closing your infopath Application.Hope this will help you.

    thisApplication.Quit(true);

    Chandrakanth/GGKTech
  • 10-22-2008 03:34 PM In reply to

    • Harij
    • Not Ranked
      Male
    • Joined on 10-20-2008
    • Posts 5

    Thanks guys,

     Sandhaypati's code worked fine.

     Thanks

    Hari :)

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.