Display/Show related procedures in class Trendline (Word VBA)

This page presents procedures from class Trendline related to the theme Display/Show: DisplayEquation and DisplayRSquared

DisplayEquation

True if the equation for the trendline is displayed on the chart (in the same data label as the R-squared value).

Setting this property to True automatically enables data labels.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart.SeriesCollection(1).Trendlines(1) 
 .DisplayRSquared = True 
 .DisplayEquation = True 
 End With 
 End If 
End With

DisplayRSquared

True if the R-squared value of the trendline is displayed on the chart (in the same data label as the equation).

Setting this property to True automatically turns on data labels.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart.SeriesCollection(1).Trendlines(1) 
 .DisplayRSquared = True 
 .DisplayEquation = True 
 End With 
 End If 
End With