3 Replies Latest reply: Oct 2, 2013 5:47 PM by Guillermo Ballester RSS

    Error in macro

       


      sub StocksActivate
      set f=ActiveDocument.Fields("inv")
      set sv=f.GetSelectedValues
      f.Select "(25|30|43)"
      end sub

      sub StocksDeactivate
      set f=ActiveDocument.Fields("inv")
      f.SelectValues sv
      end sub


      I create two subs for Page Triggers (first to Activate, second to Deactivate trigger). Main idea was to store current selection before activating page to sv variable, and restore it after deactivation. In sub Deactivate a get an error - "Type mismatch: 'f.SelectValues'"

      Any ideas?