8 Replies Latest reply: Apr 30, 2015 4:55 AM by Stanislav Strogiy RSS

    Delete variables in loading scripts

    Alexis VAILLANT

      Hi all,


      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
      End sub

      The idea is to flush the application from every variable when the reload button is engaged.


      Thanks in advance.