Dim pTextElement As ITextElement 
Dim pElement As IElement
Dim pPoint As IPoint
Dim pArea As IArea
Dim pTextSymbol As IFormattedTextSymbol
Dim pGraphicsContainer As IGraphicsContainer
Dim pCallout As ICallout
Dim screenDisplay As ESRI.ArcGIS.Display.IScreenDisplay = pActiveview.ScreenDisplay
Dim displayTransformation As ESRI.ArcGIS.Display.IDisplayTransformation = screenDisplay.DisplayTransformation
Dim returnPoint As ESRI.ArcGIS.Geometry.IPoint = New ESRI.ArcGIS.Geometry.PointClass
Dim x As System.Int32
Dim y As System.Int32
pTextElement = New TextElement
pElement = pTextElement 'QI
pTextElement.Text = "Text callout"
pArea = pFeature.Shape
pPoint = pArea.Centroid

displayTransformation.FromMapPoint(pPoint, x, y)

returnPoint.PutCoords(x, y)
pElement.Geometry = returnPoint

'Set the text element symbology to a default balloon callout
pTextSymbol = New TextSymbol
pCallout = New BalloonCallout
pTextSymbol.Background = pCallout
'Use this formula to get a callout anchor point location
returnPoint.PutCoords(x, y)

pCallout.AnchorPoint = returnPoint
pTextElement.Symbol = pTextSymbol
'Add the element to the active view, either the focus Map or PageLayout
pGraphicsContainer = pMxDoc.ActiveView
pGraphicsContainer.AddElement(pElement, 0)
pElement.Activate(pMxDoc.ActiveView.ScreenDisplay)
pActiveview.PartialRefresh(esriViewDrawPhase.esriViewGraphics, pElement, Nothing)