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 / August 2006

Tip: Looking for answers? Try searching our database.

Scripted Submit Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keith H - 10 Aug 2006 18:00 GMT
I am a newbie with InfoPath. Trying to set up a form with a scripted submit
event. Here is the VBScript I have:

Sub XDocument_OnSubmitRequest(eventObj)
' If the submit operation is successful, set
' eventObj.ReturnStatus = True
' Write your code here

    dim strURL = XDocument.Solution.URI
   
    strURL = Replace(strURL, "poreq.xsn", "post.aspx")
   
    dim oXmlHttp as new ActiveXObject("MSXML2.XMLHTTP")
    oXmlHttp.Open("PUT", strURL, false)
    oXmlHttp.Send(XDocument.DOM.xml)
    if (oXmlHttp.Status = 200 or oXmlHttp.Status = 201) then
        eventObj.ReturnStatus = True
    else
        eventObj.ReturnStatus = False
    end if
    'XDocument.UI.Alert(XDocument.Solution.URI)
   
End Sub

Using this, I get an error when trying to open the form:

Expected end of statement
File:script.vbs
Line:24
    dim strURL = XDocument.Solution.URI

I am used to VB.NET, and I don't know if there is some slight difference I'm
missing using VBScript...or if it is some other problem?
S.Y.M. Wong-A-Ton - 11 Aug 2006 06:23 GMT
Try this:

dim strURL
strURL = XDocument.Solution.URI

---
S.Y.M. Wong-A-Ton

> I am a newbie with InfoPath. Trying to set up a form with a scripted submit
> event. Here is the VBScript I have:
[quoted text clipped - 29 lines]
> I am used to VB.NET, and I don't know if there is some slight difference I'm
> missing using VBScript...or if it is some other problem?
 
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.