Get Template Location in Managed Code - InfoPath Dev
in

InfoPath Dev

Get Template Location in Managed Code

Last post 06-01-2011 02:29 PM by miriv365. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-01-2011 02:29 PM

    Get Template Location in Managed Code

    I have an InfoPath template with managed code written in InfoPath 2007, but targeted to InfoPath 2003 (we have a mixed environment here and it will unfortunately stay a mixed 2003/2007 environment for the forseeable future)  In the form I have a button that allows the user to click on it, and it will submit the form, then open a new form based on the same template.  However, I am having issues because the URI in the NewFromSolution is hard-coded.  I would like to make it more dynamic so that the managed code will know where it's template is at.  This will allow me to make changes to the form without having to modify the hardcoded URI before moving the form to production. 

     Does anyone know how to get the information I need?

    This is the current code 

    Me.thisXDocument.Submit()

    Me.thisApplication.ActiveWindow.Close(True)

    Me.thisApplication.XDocuments.NewFromSolution("http://MyProductionServer/template.xsn")

    I need to be able to build some kind of string to change the value of "http://MyProductionServer/template.xsn" to http://WHATEVERSERVER/template.xsn

     

    Any help will be appreciated.

    Thanks

     

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