none
InfoPath Dynamic Template creation using VSTA and how to host it in SharePoint? RRS feed

  • Question

  • Hi
    How to create an Info Path Template Dynamically at run time?
    1. I have to merge info path template parts into a Info Path template using a Visual Studio project depends on the information get at run time. Please give some clue or information. Specifically i am stuck with the template part merging in a Template creation VS project.

    2. Is it possible to create an XSN file from Visual Studio Info Path Template Project ?

    3. How to use an VSTA Office Info Path Template Project ? ie . how to host it in a Share Point Office form server?

    Is there any alternative solution to do it?

    Please help. Thanks in Advance

    Best Regards
    Maneesh
    Friday, December 18, 2009 9:59 AM

Answers

  • Hi Maneesh,

    Thank you for your post.

    I'm not quite familiar with VSTA, InfoPath and Sharepoint. Sorry for that.

    For your second question, as far as I know, it is not possible. You should create and edit InfoPath templates (.xsn files) with InfoPath instead of Visual Studio IDE. You could add code behind files to the templates with Visual Studio.

    Referring to your third question, for the InfoPath template projects, you could deploy it as administrator-approved form templates.
    For more detailed information, please check: http://technet.microsoft.com/en-us/library/cc197440.aspx

    FYI:
    Here're some helpful articles that shed some light on VSTA and InfoPath.
    Please refer to: http://www.summsoft.com/blogs/garyvsta/archive/2006/07/26/Finding-and-Using-VSTA-in-InfoPath-2007.aspx
                           http://social.msdn.microsoft.com/Forums/en/sharepointinfopath/thread/e30afd8b-cf7e-4fb2-82ea-32128d56c3f2

    BTW, this forum is for the support of .NET Framework installation. Since your issue is related to VSTA, InfoPath and Sharepoint, if you have any further concern, you could post your thread on Sharepoint forums. You will get more useful help there. This will make answer searching in the forum easier and be beneficial to other community members as well.

    Thank you for your understanding.

    Hope this helps!

    Have a great week.

    Best regards,
    Yichun Chen

    (This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.)
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Edited by YiChun Chen Monday, December 21, 2009 7:37 AM typo
    • Marked as answer by YiChun Chen Thursday, December 24, 2009 5:00 AM
    Monday, December 21, 2009 7:29 AM
  • Hi Maneesh,

    Thank you for your reply.

    I am sorry that I do not have any experience on developing the InfoPath template. The article I posted in my previous reply is to deploy the InfoPath template with managed code. You could also refer to the article to find out how to develop a browse compatible form.
    Publishing InfoPath 2007 Form Templates to Servers Running InfoPath Forms Services (http://msdn.microsoft.com/en-us/library/bb687718.asp

    For your concern on development, I think that the better consulting place should be Sharepoint forums.

    Hope this helps!

    Have a great week!

    Best regards,
    Yichun Chen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Edited by YiChun Chen Tuesday, December 22, 2009 6:36 AM typo
    • Marked as answer by YiChun Chen Thursday, December 24, 2009 5:00 AM
    Tuesday, December 22, 2009 6:31 AM

All replies

  • Hi Maneesh,

    Thank you for your post.

    I'm not quite familiar with VSTA, InfoPath and Sharepoint. Sorry for that.

    For your second question, as far as I know, it is not possible. You should create and edit InfoPath templates (.xsn files) with InfoPath instead of Visual Studio IDE. You could add code behind files to the templates with Visual Studio.

    Referring to your third question, for the InfoPath template projects, you could deploy it as administrator-approved form templates.
    For more detailed information, please check: http://technet.microsoft.com/en-us/library/cc197440.aspx

    FYI:
    Here're some helpful articles that shed some light on VSTA and InfoPath.
    Please refer to: http://www.summsoft.com/blogs/garyvsta/archive/2006/07/26/Finding-and-Using-VSTA-in-InfoPath-2007.aspx
                           http://social.msdn.microsoft.com/Forums/en/sharepointinfopath/thread/e30afd8b-cf7e-4fb2-82ea-32128d56c3f2

    BTW, this forum is for the support of .NET Framework installation. Since your issue is related to VSTA, InfoPath and Sharepoint, if you have any further concern, you could post your thread on Sharepoint forums. You will get more useful help there. This will make answer searching in the forum easier and be beneficial to other community members as well.

    Thank you for your understanding.

    Hope this helps!

    Have a great week.

    Best regards,
    Yichun Chen

    (This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.)
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Edited by YiChun Chen Monday, December 21, 2009 7:37 AM typo
    • Marked as answer by YiChun Chen Thursday, December 24, 2009 5:00 AM
    Monday, December 21, 2009 7:29 AM
  • Hi Yichun

    Thank you very much  for answering.

    It will be helpfull if the third question get answered elaborately. the question was
    "How to use an VSTA Office Info Path Template Project ? ie . how to host it in a Share Point Office form server? "

    Here the VSTA Office Info Path Template Project does not contain an .XSN file, but inside VS project it is managed as a folder containing the internal XML Schema files as per [MS-IPFF]: InfoPath Form Template Format Structure Specification. (ie manifest.xsf, myschema.xsd, sampledata.xml, template.xml, view1.xsl, upgrade.xsl)

    The link provided : http://technet.microsoft.com/en-us/library/cc197440.aspx is for deploying .XSN file with managed code DLL right?

    In VSTA 2008 Info Path Template project , i get it not as an .XSN file . but as a collection of .XSN's internal files. That what is i needed also(The Advantage is that we can edit these files at run time and dynamic template creation is possible there).

    Specifically, i would like to know about how to deploy and how to call/use this kind of template project with in a web application/SharePoint site programmatically. (I think this is not Share Point Specific question.).

    Thanks in advance.

    Have a great time.

    Best Regards
    Maneesh Kumar M


    Monday, December 21, 2009 12:56 PM
  • Hi Maneesh,

    Thank you for your reply.

    I am sorry that I do not have any experience on developing the InfoPath template. The article I posted in my previous reply is to deploy the InfoPath template with managed code. You could also refer to the article to find out how to develop a browse compatible form.
    Publishing InfoPath 2007 Form Templates to Servers Running InfoPath Forms Services (http://msdn.microsoft.com/en-us/library/bb687718.asp

    For your concern on development, I think that the better consulting place should be Sharepoint forums.

    Hope this helps!

    Have a great week!

    Best regards,
    Yichun Chen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Edited by YiChun Chen Tuesday, December 22, 2009 6:36 AM typo
    • Marked as answer by YiChun Chen Thursday, December 24, 2009 5:00 AM
    Tuesday, December 22, 2009 6:31 AM
  • Hello

    The answer is yes you can program and design infopath froms in visual studio 2008 upward; just download office add-ins for visual studio and created project using the infopath form template a project will be created that includes .xsn the code behind of the form, .xsf file.

    what is more fun is that you can import the xsn that you created before to this project and copy paste the code behind in the FormCode.cs

    Cheers 

     


    Momo
    Tuesday, June 8, 2010 3:47 PM