<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calling VB script macro from load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490751#M693801</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't call ActiveDocument elements at LOAD time. They are not constructed yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Apr 2014 06:13:20 GMT</pubDate>
    <dc:creator>luciancotea</dc:creator>
    <dc:date>2014-04-02T06:13:20Z</dc:date>
    <item>
      <title>Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490742#M693792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This problem is so frustrating and I am sure there is an easy answer...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a vb macro that performs a soap call and then writes the xml that is returned to a file. I can run this from the&amp;nbsp; front end with a button that activates the macro and everything works just fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when i try and call the script using Let loadfile = MyVBMacro();&amp;nbsp; in the load script nothing happens! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a security setting I'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 12:12:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490742#M693792</guid>
      <dc:creator />
      <dc:date>2013-07-17T12:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490743#M693793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can call only functions, not subroutines. Change from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;MyVBMacro&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;END SUB &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNC &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;MyVBMacro&lt;/SPAN&gt;() &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;END FUNC &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 12:29:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490743#M693793</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2013-07-17T12:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490744#M693794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lucian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is constructed as a function already. Any other ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 12:36:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490744#M693794</guid>
      <dc:creator />
      <dc:date>2013-07-17T12:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490745#M693795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a working example of calling macro function from script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 12:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490745#M693795</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2013-07-17T12:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490746#M693796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Again Lucian, but still no joy. Any ideas if you see my code with just the soap addresses removed?&lt;/P&gt;&lt;P&gt;Below is my script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Load script&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;ADDRESS&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;getRA&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;wsSOAP_RA(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/ADDRESS&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;I have 3 variables &lt;/STRONG&gt;&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;getRA&lt;/P&gt;&lt;P&gt;vXMLRecieved&lt;/P&gt;&lt;P&gt;vXMLSent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;The VB script:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;function wsSOAP_RA()&lt;BR /&gt;&lt;BR /&gt; 'Confect xml to send&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlToSend = ""&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; xmlToSend = xmlToSend &amp;amp; "&amp;lt;soapenv:Envelope xmlns:soapenv='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;&lt;SPAN&gt;' xmlns:soap='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://XXXXXXXXXXXXXXXXXXXXXXXXXXXX:1"&gt;http://XXXXXXXXXXXXXXXXXXXXXXXXXXXX:1&lt;/A&gt;&lt;SPAN&gt;'&amp;gt;"&amp;amp; vbCr &amp;amp; vbLf&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt; xmlToSend = xmlToSend &amp;amp; "&amp;lt;soapenv:Header&amp;gt;"&amp;amp; vbCr &amp;amp; vbLf&lt;BR /&gt;&lt;BR /&gt; xmlToSend = xmlToSend &amp;amp; "&amp;lt;soap:appid&amp;gt;test&amp;lt;/soap:appid&amp;gt;"&amp;amp; vbCr &amp;amp; vbLf&lt;BR /&gt;&lt;BR /&gt; xmlToSend = xmlToSend &amp;amp; "&amp;lt;/soapenv:Header&amp;gt;"&amp;amp; vbCr &amp;amp; vbLf&lt;BR /&gt;&lt;BR /&gt; xmlToSend = xmlToSend &amp;amp; "&amp;lt;soapenv:Body&amp;gt;"&amp;amp; vbCr &amp;amp; vbLf&lt;BR /&gt;&lt;BR /&gt; xmlToSend = xmlToSend &amp;amp; "&amp;lt;urn:findAllResearchAreas&amp;gt;"&amp;amp; vbCr &amp;amp; vbLf&lt;BR /&gt;&lt;BR /&gt; xmlToSend = xmlToSend &amp;amp; "&amp;lt;/urn:findAllResearchAreas&amp;gt;"&amp;amp; vbCr &amp;amp; vbLf&lt;BR /&gt;&lt;BR /&gt; xmlToSend = xmlToSend &amp;amp; "&amp;lt;/soapenv:Body&amp;gt;"&amp;amp; vbCr &amp;amp; vbLf&lt;BR /&gt;&lt;BR /&gt; xmlToSend = xmlToSend &amp;amp; "&amp;lt;/soapenv:Envelope&amp;gt;"&amp;amp; vbCr &amp;amp; vbLf&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; 'Record xml sent to QV variable&lt;BR /&gt;&lt;BR /&gt; set txt1 = ActiveDocument.Variables("vXMLSent")&lt;BR /&gt;&lt;BR /&gt; txt1.setContent xmlToSend, true&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; 'Create xmlhttp opject &lt;BR /&gt;&lt;BR /&gt; Set xmlhttp = CreateObject("Microsoft.XMLHTTP")&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; xmlhttp.open "POST", "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://XXXXXXXXXXXXXXX/Organisation_Services/ResearchAreaInteraction/1"&gt;http://XXXXXXXXXXXXXXX/Organisation_Services/ResearchAreaInteraction/1&lt;/A&gt;&lt;SPAN&gt;", false &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'xmlhttp.open "POST", "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:8080/Organisation_Services/ResearchAreaInteraction/1"&gt;http://localhost:8080/Organisation_Services/ResearchAreaInteraction/1&lt;/A&gt;&lt;SPAN&gt;", false &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; xmlhttp.setRequestHeader "Content-Type", "text/xml;charset=UTF-8"&lt;BR /&gt;&lt;BR /&gt; xmlhttp.setRequestHeader "SOAPAction", "XXXXXXXXXXXXXXX:1:findAllResearchAreas"&lt;BR /&gt;&lt;BR /&gt; xmlhttp.send xmlToSend&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; result = xmlhttp.responseText&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt; result = replace(result, "&amp;amp;gt;", "&amp;gt;")&lt;BR /&gt;&lt;BR /&gt; result = replace(result, "&amp;amp;lt;", "&amp;lt;")&lt;BR /&gt;&lt;BR /&gt; set txt2 = ActiveDocument.Variables("vXMLReceived")&lt;BR /&gt;&lt;BR /&gt; txt2.setContent result, true&lt;BR /&gt;&lt;BR /&gt; ' Set folder name where file will be saved&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; foldername = "G:\Documents\Qlikview scripts\"&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; ' Set file name where data will be stored&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; filename = "xmlReponse.xml"&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; ' Check if folder exists else create it&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; If objFSO.FolderExists(foldername) Then&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; Set objFolder = objFSO.GetFolder(foldername)&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; Else&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; Set objFolder = objFSO.CreateFolder(foldername)&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; End If&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; ' Check if file exists else create it&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; If objFSO.FileExists(foldername &amp;amp; filename) Then&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; Set objFolder = objFSO.GetFolder(foldername)&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; Else&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; Set objFile = objFSO.CreateTextFile(foldername &amp;amp; filename)&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; End If&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; set objFile = nothing&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; set objFolder = nothing&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; ' Constant that indicate that file content will be overwritten and not appended&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; Const ForAppending = 2&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; ' Open the text file&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; Set objTextFile = objFSO.OpenTextFile (foldername &amp;amp; filename, ForAppending, True)&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; ' And paste the content&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; objTextFile.WriteLine(result)&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; objTextFile.Close&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;end function&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 13:04:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490746#M693796</guid>
      <dc:creator />
      <dc:date>2013-07-17T13:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490747#M693797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe it's because you call some elements from the document which are not available at load time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 13:46:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490747#M693797</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2013-07-17T13:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490748#M693798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the point Lucian - yes I stripped out the variables vXMLSent and vXMLReceived and its working fine. Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 14:47:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490748#M693798</guid>
      <dc:creator />
      <dc:date>2013-07-17T14:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490749#M693799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get a macro to execute from the Load Script and it is not working.&amp;nbsp; Can anyone see what is wrong with the Macro code which prevents this from executing in the Load Script?&amp;nbsp; It works fine when executing the macro via a button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION SOAP_REQUEST&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set rel_expr_val = ActiveDocument.Variables("vRelevanceExpression")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox("Test")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; xmlToSend = ""&lt;/P&gt;&lt;P&gt;&amp;nbsp; xmlToSend = xmlToSend &amp;amp; "&amp;lt;?xml version='1.0' encoding='utf-8'?&amp;gt;" &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; xmlToSend = xmlToSend &amp;amp; "&amp;lt;soap:Envelope xmlns:xsi='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;&lt;SPAN&gt;'&amp;nbsp; xmlns:xsd='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;&lt;SPAN&gt;'&amp;nbsp; xmlns:soap='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;&lt;SPAN&gt;'&amp;gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; xmlToSend = xmlToSend &amp;amp; "&amp;lt;soap:Body&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; xmlToSend = xmlToSend &amp;amp; "&amp;lt;GetRelevanceResult xmlns='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://TEST/webreports"&gt;http://TEST/webreports&lt;/A&gt;&lt;SPAN&gt;'&amp;gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; xmlToSend = xmlToSend &amp;amp; "&amp;lt;relevanceExpr&amp;gt;&amp;lt;![CDATA["&amp;amp;rel_expr_val.GetContent.String&amp;amp;"]]&amp;gt;&amp;lt;/relevanceExpr&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlToSend = xmlToSend &amp;amp; "&amp;lt;username&amp;gt;qlikview&amp;lt;/username&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlToSend = xmlToSend &amp;amp; "&amp;lt;password&amp;gt;qlikview&amp;lt;/password&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp; xmlToSend = xmlToSend &amp;amp; "&amp;lt;/GetRelevanceResult&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp; xmlToSend = xmlToSend &amp;amp; "&amp;lt;/soap:Body&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp; xmlToSend = xmlToSend &amp;amp; "&amp;lt;/soap:Envelope&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set txt1 = ActiveDocument.Variables("vXMLSent")&lt;/P&gt;&lt;P&gt;&amp;nbsp; txt1.setContent xmlToSend, true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Create xmlhttp opject &lt;/P&gt;&lt;P&gt;&amp;nbsp; Set xmlhttp = CreateObject("Microsoft.XMLHTTP")&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; xmlhttp.open "POST", "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://TEST/webreports"&gt;http://TEST/webreports&lt;/A&gt;&lt;SPAN&gt;", false &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; xmlhttp.setRequestHeader "Content-Type", "text/xml"&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; xmlhttp.setRequestHeader "SOAPAction", "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://TEST/webreports"&gt;http://TEST/webreports&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; xmlhttp.send xmlToSend&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; result = xmlhttp.responseText&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; result = replace(result, "&amp;amp;gt;", "&amp;gt;")&lt;/P&gt;&lt;P&gt;&amp;nbsp; result = replace(result, "&amp;amp;lt;", "&amp;lt;")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; Path = ActiveDocument.Evaluate("left(DocumentPath(), index(DocumentPath(), '\', -1))")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set FileDestVar = ActiveDocument.Variables("vFldrDataExtracts")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileName = FileDestVar.GetContent.String&amp;amp;"\Test.xml"&lt;/P&gt;&lt;P&gt;&amp;nbsp; set fso = CreateObject("Scripting.FileSystemObject")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set s = fso.CreateTextFile(FileName, True)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.writeline(result)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.Close()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; ActiveDocument.DoReload 2, true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set txt2 = ActiveDocument.Variables("vXMLReceived")&lt;/P&gt;&lt;P&gt;END FUNCTION&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 16:09:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490749#M693799</guid>
      <dc:creator />
      <dc:date>2013-12-23T16:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490750#M693800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I want to pass&amp;nbsp; value from macro function to script ,on cliking the button.Later that value will be used in load statement .&lt;/P&gt;&lt;P&gt;In macro I wrote the code like this.The variable fxV is need to be passed in script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In script&amp;nbsp; &lt;IMG alt="mac.PNG.png" class="jive-image" height="120" src="https://community.qlik.com/legacyfs/online/56319_mac.PNG.png" width="386" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="loa.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/56320_loa.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;I want to use the selected value from the list box in WHERE clause.Then the result alone will be saved in qvd file.&lt;/P&gt;&lt;P&gt;When Im doing like this&amp;nbsp; I got the error like this.&lt;IMG alt="Capture1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/56321_Capture1.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;Please help me in solving this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 12:12:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490750#M693800</guid>
      <dc:creator />
      <dc:date>2014-04-01T12:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490751#M693801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't call ActiveDocument elements at LOAD time. They are not constructed yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 06:13:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490751#M693801</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2014-04-02T06:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490752#M693802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want to call ActiveDocument.Fields() at LOAD time. It's not available at that time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 06:15:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490752#M693802</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2014-04-02T06:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490753#M693803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; can you please mention where the ActiveDocument.Fields() need to be used?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 09:09:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490753#M693803</guid>
      <dc:creator />
      <dc:date>2014-04-02T09:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calling VB script macro from load script</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490754#M693804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't said you need, I said you want to call &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ActiveDocument.Fields()&lt;/SPAN&gt; at LOAD time. You can't do that because &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ActiveDocument.Fields()&lt;/SPAN&gt; does not exists at LOAD time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 16:36:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VB-script-macro-from-load-script/m-p/490754#M693804</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2014-04-02T16:36:27Z</dc:date>
    </item>
  </channel>
</rss>

