I have statemaent there I try to give part of an expressen in macro that i can use in chart.
ActiveDocument.CreateVariable "vExpression"
exp=
"(" &
for i=1 to v
"(out>=vin" &(i)& " and in<=vout" &(i)& " and depatment=vdep" &(i)& ")"&
if(i<v," or ")&
next
")"
'ActiveDocument.Variables("vExpression").SETCONTENT exp,TRUE
What I want to acheve is the variable with the following expression: (out=vin1 and in<=vout1 and depatment=vdep1) or (out=vin2 and in<=vout2 and depatment=vdep2) and so on baut there is tomething wrong in my script.