Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hello
In this script I would to show the msgBox referred to the content of variavle. It soesn't work. Please coul to correct What I wrote.
 sub var
 set a= ActiveDocument.Variables("Variable1")
 a.SetContent "4" , true
 FOR I=1 to Variable1
.msgBox("Hello")
 Next
end sub
Thanks
Best regrds
Slash
 
					
				
		
 biester
		
			biester
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I don't know what you intend with it, but the correct code should be:
sub var
set a= ActiveDocument.Variables("Variable1")
' setting the content
a.SetContent "4",true
' reading the content
value = a.GetContent.String
for i = 1 to value
msgbox "Hello"
next
end sub
Don't mix up variables from the qvw-application and variables from the module. You can't mix them!
Rgds,
Joachim
 
					
				
		
Hi,
thnks. Yes is what I'm lookung for.
Please , if I want to add the counter how I do.
Example (do not work)
sub var
 set a= ActiveDocument.Variables("Variable1")
 ' setting the content
 a.SetContent "4",true
 ' reading the content
 value = a.GetContent.String
 for i = 1 to value
msgbox "Hello"+ i
 next
end sub
the value of o is avaiable?
thanks
Best regards
Slash
 
					
				
		
 biester
		
			biester
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The value of "o"?? What "o"?
Nevertheless, it must be
msgbox "Hello" & i
It's a string concatenation, not an addition.
Rgds,
Joachim
 
					
				
		
Zero?
The i value is 1 the first ... and 4 the last
Now works. Pleas try the script to understand What I would to do ..
The documentation is many time enough or bad explained.
The part of APi, VBscript is very enough.
thanks
Slash
 
					
				
		
 biester
		
			biester
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes, of course, if value = 4 and you start
for i = 1 to value
then i starts with 1 and ends with 4.
Everything clear now?
Rgds,
Joachim
