<?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: OSUser in Macro file path in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/OSUser-in-Macro-file-path/m-p/1542618#M745811</link>
    <description>&lt;P&gt;Hello Settu&lt;/P&gt;&lt;P&gt;Thanks, I will check your solution in a while.&lt;/P&gt;&lt;P&gt;What if there are spaces in my file path as shown below?&lt;/P&gt;&lt;PRE&gt;set v = ActiveDocument.Variables("vUserName")
vUser = v.GetContent.String
filepath="C:\Users\"&amp;amp;vUser&amp;amp;"\Documents\New Documents\Sample.qvw"&lt;/PRE&gt;&lt;P&gt;Can you please provide alternate to the above script where i can consider spaces in the file path defined above?&lt;/P&gt;</description>
    <pubDate>Tue, 12 Feb 2019 04:11:31 GMT</pubDate>
    <dc:creator>haribabugv</dc:creator>
    <dc:date>2019-02-12T04:11:31Z</dc:date>
    <item>
      <title>OSUser in Macro file path</title>
      <link>https://community.qlik.com/t5/QlikView/OSUser-in-Macro-file-path/m-p/1542515#M745809</link>
      <description>&lt;P&gt;Hello users,&lt;/P&gt;&lt;P&gt;I am trying to open a file using a macro and then executing it.&lt;/P&gt;&lt;P&gt;I am getting error when i try below script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have defined vUserName&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;subfield&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;OSUser&lt;/SPAN&gt;&lt;SPAN&gt;(),'\',2) in variable settings.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;set v = ActiveDocument.Variables("vUserName") 
vUserName = v.GetContent.String 
filepath="C:\Users\("&amp;amp;vUserName&amp;amp;")\Documents\Sample.qvw"&lt;/PRE&gt;&lt;P&gt;is there anything wrong in the above script? can you please correct it and share the correct code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:29:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OSUser-in-Macro-file-path/m-p/1542515#M745809</guid>
      <dc:creator>haribabugv</dc:creator>
      <dc:date>2024-11-16T04:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: OSUser in Macro file path</title>
      <link>https://community.qlik.com/t5/QlikView/OSUser-in-Macro-file-path/m-p/1542565#M745810</link>
      <description>Can you try this.?&lt;BR /&gt;&lt;BR /&gt;set v = ActiveDocument.Variables("vUserName")&lt;BR /&gt;vUser = v.GetContent.String&lt;BR /&gt;filepath="C:\Users\"&amp;amp;vUser&amp;amp;"\Documents\Sample.qvw"</description>
      <pubDate>Mon, 11 Feb 2019 21:19:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OSUser-in-Macro-file-path/m-p/1542565#M745810</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2019-02-11T21:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: OSUser in Macro file path</title>
      <link>https://community.qlik.com/t5/QlikView/OSUser-in-Macro-file-path/m-p/1542618#M745811</link>
      <description>&lt;P&gt;Hello Settu&lt;/P&gt;&lt;P&gt;Thanks, I will check your solution in a while.&lt;/P&gt;&lt;P&gt;What if there are spaces in my file path as shown below?&lt;/P&gt;&lt;PRE&gt;set v = ActiveDocument.Variables("vUserName")
vUser = v.GetContent.String
filepath="C:\Users\"&amp;amp;vUser&amp;amp;"\Documents\New Documents\Sample.qvw"&lt;/PRE&gt;&lt;P&gt;Can you please provide alternate to the above script where i can consider spaces in the file path defined above?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 04:11:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OSUser-in-Macro-file-path/m-p/1542618#M745811</guid>
      <dc:creator>haribabugv</dc:creator>
      <dc:date>2019-02-12T04:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: OSUser in Macro file path</title>
      <link>https://community.qlik.com/t5/QlikView/OSUser-in-Macro-file-path/m-p/1542634#M745812</link>
      <description>&lt;P&gt;try&lt;/P&gt;&lt;PRE&gt;SUB test1()
	set v = ActiveDocument.Variables("vUserName")
	vUser = v.GetContent.String
	filepath="C:\Users\"&amp;amp;vUser&amp;amp;"\Documents\New Documents\Sample.qvw"
	'msgbox filepath
	
	' for tests:
	qvpath = "C:\Program Files\QlikView\qv.exe"
	filepath = "d:\Qlik\Dev\30_QvdGenerators\model_oos.qvw"
	
	' use chr(34)
	Set shell = CreateObject("WScript.Shell")
	shell.Run chr(34) &amp;amp; qvpath &amp;amp; chr(34) &amp;amp; " " &amp;amp; chr(34) &amp;amp; filepath &amp;amp;  chr(34)
	
END SUB&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Feb 2019 04:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/OSUser-in-Macro-file-path/m-p/1542634#M745812</guid>
      <dc:creator>Chernov</dc:creator>
      <dc:date>2019-02-12T04:57:06Z</dc:date>
    </item>
  </channel>
</rss>

