I am trying to dynamically populate a drop-down list by calling a web service, I have this example: http://support.microsoft.com/kb/826994
but the code is vbscript or jscript, I need VB.
Can someone provide an example or help me change this to vb?
Dim fieldValue
set fieldValue = XDocument.DOM.selectSingleNode( "/my:myFields/my:field1" )
'Get a reference to the SDS bound to the Web Service.
Dim theDataObject
set theDataObject = XDocument.DataObjects.Item("GetCities")
'Set the SelectionNamespaces so that you can find the correct field.
'Note: If the Web service was created with Visual Studio .NET 2003, the xmlns:s0 namespace is
'http://tempuri.org/PopulateCities/Service1
theDataObject.DOM.setProperty"SelectionNamespaces", _
"xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"" " &_
"xmlns:s0=""http://tempuri.org/"""
Dim queryValue
set queryValue = theDataObject.DOM.selectSingleNode( _
"/dfs:myFields/dfs:queryFields/s0:GetCities/s0:sState" )
queryValue.text = fieldValue.text
theDataObject.Query
XDocument.View.ForceUpdate