Is there a way to do the same thing than the following macro by the very beginning of the loading script?
Sub cleanVariables Set VariableCollection = ActiveDocument.GetVariableDescriptions For i = 0 to VariableCollection.Count - 1 Set tempVar = VariableCollection.Item(i) tempVarName = tempVar.Name ActiveDocument.RemoveVariable tempVarName Next End sub
The idea is to flush the application from every variable when the reload button is engaged.
this leads me to another possible situation: suppose you create the variable declaring it on the script but forget to assign the empty value and after loading and using the frontend, you save the document, storing the variable into it. In this case, I think, whether you insert the [ set vVar=; ] statement in the script, you ought to delete it from the document using the Document Property window.
You are correct Martin. You created variable in the script and refresh the app. So you can see the the variable on the Variable window (Ctrl+Alt+v). If you delete the variable from application, you need to assign null or nothing in the script. If the variables already on UI, you shouldd have to delete from UI as well.