2 Replies Latest reply: Jan 23, 2015 12:57 PM by Michael Costner RSS

    Select values in straight table chart using a macro

    Michael Costner

      Hello,

       

      I would like to create a macro that automatically selects values in a chart based on a variable's value.

       

      I have a variable called Status that has a value of either A, B, C, or D. This variable is used as a dimension in a straight table chart.

       

      When I run my macro, I would like to select lines in my chart where Status has a value of A or B. I have tried several different variations of the macro below, but it is not working.

       

      sub Selects

      arr1 = Array("A", "B")

      ActiveDocument.Fields("Status").Select arr1

      end sub

       

      Seems like it should be fairly straightforward. Any thoughts about how I can get this macro to work?

       

      Thanks!

       

      Michael