Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / May 2006

Tip: Looking for answers? Try searching our database.

Newbie Question: Multiple Script Files in Single InfoPath Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Warwick Foster - 23 May 2006 08:50 GMT
Hello folks,

Could someone please tell me how to correctly reference an additional script
file?

As a developer I want to include a number of code modules into the scipt
section of an InfoPath form. In reading through the associated documentation
I noted the use of the following XML tags in the manifest.xsf:

    <xsf:file name="script2.vbs">
        <xsf:fileProperties>
            <xsf:property name="scriptType" type="string"
            value="userEvents"></xsf:property>
        </xsf:fileProperties>
    </xsf:file>
    <xsf:file name="script.vbs">
        <xsf:fileProperties>
            <xsf:property name="scriptType" type="string"
                value="userEvents"></xsf:property>
        </xsf:fileProperties>
    </xsf:file>
and
    <xsf:scripts language="vbscript.encode">
        <xsf:script src="script.vbs"></xsf:script>
        <xsf:script src="script2.vbs"></xsf:script>
    </xsf:scripts>

Using both of these tags I hopped to import an additional script file which
I would use to include a library of interchangeable function. But to no
avail. The scripting engine would only allow me access to the first file
defined in the <Files> tag (the contining tag for the two <File> elements.

Could someone please tell me how to correctly reference an additional script
file?

Thank you all for taking the time to get this far down the email.

Signature

Warwick Foster
Australian Taxation Office

Greg Collins [InfoPath MVP] - 23 May 2006 18:56 GMT
Did you also include the second script file as a resource to your form template? This is required.

Signature

Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPath Dev ( http://www.InfoPathDev.com )

Warwick Foster - 24 May 2006 00:39 GMT
Thanks Greg,

Unsure how to make this work. Could you write me up a simple procedure on
how to add it in or point me some documentation on how to do it?

Thank you
Signature

Warwick Foster
Australian Taxation Office

> Did you also include the second script file as a resource to your form template? This is required.
Greg Collins [InfoPath MVP] - 24 May 2006 19:01 GMT
In the designer, you must go to Tools | Resource Files and then make sure that you add your second script file in there.

You must do the update you did in the manifest, but you also must add your script file as a resource to the template.

Signature

Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPath Dev ( http://www.InfoPathDev.com )

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.