1 Reply Latest reply: Jan 26, 2012 6:32 AM by Jerry Svensson RSS

    Change Expression Comment with Macro

    Karl Pover

      Is it possible to add a comment to an expression with a macro?  I see a function call Comment defined within the iExpressionData class, but there is no example and when I try the following

       

       

      set chart = ActiveDocument.getSheetObject("ReportBuilder")
      set chartProperties = chart.GetProperties
      set chartExpressions  = chartProperties.Expressions
      set chartExpression = chartExpressions.Item(j).Item(0).Data
      chartExpression.ExpressionVisual.Label.v = Metric & "(This)"
      chartExpression.ExpressionData.Comment.v "='$(" & Metric & ")'"
      
      

       

      I get an error that this property or method does not exist.  I've tried with and without the ".v".  Has anybody been able to add a comment by using a macro?

       

      Thanks, Karl