Using MSXML2.XMLHTTP

J

Jeff

I am using Infopath2003 and have a script.vbs file.

I want to utilize SOAP to send data from within the script.vbs. Here's part
of my coding:

'<namespacesDefinition>
XDocument.DOM.setProperty "SelectionNamespaces",
"xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:my=""http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-10-19T20:52:46"" xmlns:xd=""http://schemas.microsoft.com/office/infopath/2003"""
'</namespacesDefinition>


'=======
' The following function handler is created by Microsoft Office InfoPath.
' Do not modify the name of the function, or the name and number of arguments.
'=======
Sub CTRL12_5_OnClick(eventObj)
'Write your code here

Dim oXmlHttp As MSXML2.XMLHTTP 'cant get past this
...

End Sub

I am getting an error message when opening the template that says "Expected
End of statement at Line 22"

Its referring to the "Dim" line.

Is there something I am missing or not doing? I am wondering if i cant do
this in the vbs file and maybe i need to do this in .NET. If so can someone
give me some guidance on that?
 
S

S.Y.M. Wong-A-Ton

VBScript does not know typed variables. Change the line into

Dim oXmlHttp

and you should be fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top