Edit

Share via


TextRange2.InsertChartField(MsoChartFieldType, String, Int32) Method

Definition

Inserts a field into the body of a data label in a chart.

public Microsoft.Office.Core.TextRange2 InsertChartField (Microsoft.Office.Core.MsoChartFieldType ChartFieldType, string Formula = "", int Position = -1);
abstract member InsertChartField : Microsoft.Office.Core.MsoChartFieldType * string * int -> Microsoft.Office.Core.TextRange2
Public Function InsertChartField (ChartFieldType As MsoChartFieldType, Optional Formula As String = "", Optional Position As Integer = -1) As TextRange2

Parameters

ChartFieldType
MsoChartFieldType

Contains the text to be inserted.

Formula
String

Specifies a cell (or range) if the MsoChartFieldType msoChartFieldFormula constant is passed in for the ChartFieldType parameter.

Position
Int32

Specifies the character position where the chart field is inserted. The default is to append the field to the end of the text. If the position value is out of range, the default is used.

Returns

TextRange2

Remarks

This method applies only to data labels in a chart. Calling this method on any other kind of TextRange2

Applies to