Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
How to turn this command in vbscript?
let vDate = Date(Now(), 'YYMMDD');
 
					
				
		
does anyone know? I need to finish the script today: (
 
					
				
		
try with something like this:
sub X
v = ActiveDocument.Evaluate("=date(today(),'DD/MM/YYYY')")
ActiveDocument.Variables("vDate").SetContent v, true
end sub
then add action external to execute macro X
Hope this help you
 
					
				
		
this line.....
ActiveDocument.Variables("vDate").SetContent v, true
has some error is not working ...
.png) 
					
				
		
 Miguel_Angel_Ba
		
			Miguel_Angel_BaHi,
Did you create the variable in the document? Settings menu, Variable Overview.
Regards,
Miguel
 
					
				
		
like this
v = today()
.png) 
					
				
		
 Miguel_Angel_Ba
		
			Miguel_Angel_BaHi,
ActiveDocument.Variables("vDate")
Refers to an actual variable that has to be created before getting a value. Go to the Settings menu, Variable Overview and Add a new one and call it vDate. Then the macro will work.
Regards,
Miguel
 
					
				
		
it worked ....
How do I get the value of this variable and saved a excel document?
i try this
XLDoc.SaveAs "c:\Qlikview\Claro"&vDate&".xls"
 
					
				
		
You have to get the variable value, so use:
XLDoc.SaveAs "c:\Qlikview\Claro"& ActiveDocument.Variables("vDate").GetContent.String &".xls"
Regards
 
					
				
		
Excel displays an error .... like this
Excel can not access the file 'C: \ QlikView \ Claro03 \ 12 \ D5680000'. There are several possible reasons
