locked
Open document library form on button click RRS feed

  • Question

  • i have create infopath form and published as a document library type. Now my requirement is to create a button on home page of site, so when user click on that button it should open infopath form.iam tried to below code

    1) Add a Content Query WebPart on a page.
    3) Click on Open Tool Pane
    4) Click on Source Editor button
    5) Place the below script in it

    <script type="text/vbscript" language="vbscript"> 
    Dim urlLibrary 
    Dim urlTemplate 
    urlLibrary = ""
    urlTemplate = urlLibrary + "/forms/template.xsn"
    Sub CreateNewInfoPathDocument 
    dim objOpenXMLDocuments 
    set objOpenXMLDocuments = Createobject("SharePoint.OpenXMLDocuments") 
    objOpenXMLDocuments.CreateNewDocument2 window, urlTemplate, urlLibrary
    End Sub 
    < /script> 
    < button onclick="CreateNewInfoPathDocument()">Create New</button>

    the form opened in infopath form but i want to open a document library form in that site only....... can please help

    Thanks,

    Swathika

     

    Wednesday, October 17, 2012 10:43 AM

All replies

  • Hi

    Try going to your InfoPath library and open a new form. Copy the url and change if you must then use that url on your button.



    Pedro Aparcana

    Wednesday, October 17, 2012 7:43 PM