Hah. Spoke too soon. Looks like I kind of have a Dot Net version of the VBA code. I frankly don't know if this works. I think it does but it's been years since I used it. Looks like this updated code only changes the color TO green in this example but you get the idea:
Imports ESRI.ArcGIS.ArcMapUI
Imports ESRI.ArcGIS.Carto
Imports ESRI.ArcGIS.Display
Public Class cmdMakeLabelGreen
Inherits ESRI.ArcGIS.Desktop.AddIns.Button
Public Sub New()
End Sub
Protected Overrides Sub OnClick()
Dim application As ESRI.ArcGIS.Framework.IApplication = Nothing
Dim pIMxDoc As IMxDocument
Dim pMap As IMap
Dim pActiveView As IActiveView
Dim pGraphSel As IGraphicsContainerSelect
Dim numSel As Integer
Dim pDisplay As IDisplay
Dim pContainer As IGraphicsContainer
Dim pSymbol As ITextSymbol
Dim myColor As IRgbColor
Dim whiteFill As IRgbColor
Dim pTextElement As ITextElement
Dim pCallout As IBalloonCallout
Dim pFillSymbol As IFillSymbol
Dim pLineSymbol As ILineSymbol
Dim pTextBackground As ITextBackground
Dim pTextSymbol As IFormattedTextSymbol
Try
application = My.ArcMap.Application
Dim document As ESRI.ArcGIS.Framework.IDocument = application.Document
'pMxDoc = application.Document
pIMxDoc = CType(document, ESRI.ArcGIS.ArcMapUI.IMxDocument)
pActiveView = pIMxDoc.FocusMap
pDisplay = pActiveView.ScreenDisplay
pMap = pIMxDoc.FocusMap
pContainer = pIMxDoc.FocusMap
pGraphSel = pContainer
'--------------------------------------------------------------------------
'Make sure only one label is selected. Adjust as desired..
'--------------------------------------------------------------------------
numSel = pGraphSel.ElementSelectionCount
Select Case numSel
Case 0
MsgBox("You must select a label!", vbExclamation, "Error Encountered")
Exit Sub
Case 1
'Do Nothing
Case Else
MsgBox("You must have one label selected!", vbExclamation, "Error Encountered")
Exit Sub
End Select
Dim index As Integer
Dim pElement As IElement
For index = 0 To numSel - 1
pElement = pGraphSel.SelectedElement(index)
If TypeOf pElement Is ITextElement Then
pTextElement = pGraphSel.SelectedElement(index)
pSymbol = pTextElement.Symbol
myColor = pSymbol.Color
'Road is changing from closed to OPEN
myColor.Red = 38
myColor.Green = 115
myColor.Blue = 0
pSymbol.Color = myColor
whiteFill = New RgbColor
whiteFill.Red = 255
whiteFill.Green = 255
whiteFill.Blue = 255
pLineSymbol = New SimpleLineSymbol
pFillSymbol = New SimpleFillSymbol
pLineSymbol.Color = myColor
pLineSymbol.Width = 1
pFillSymbol.Color = whiteFill
pFillSymbol.Outline = pLineSymbol
pTextElement.Symbol = pSymbol
pElement = pTextElement
pTextSymbol = pTextElement.Symbol
pTextBackground = pTextSymbol.Background
pCallout = pTextBackground
pCallout.Symbol = pFillSymbol '.Outline.Color = myColor
pTextSymbol.Background = pCallout
pTextElement.Symbol = pTextSymbol
pElement = pTextElement
pContainer.UpdateElement(pElement)
End If
Next index
pActiveView.PartialRefresh(ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewGeography, Nothing, Nothing)
'----------------------------------------------------------------------
'Release any memory allocated
'----------------------------------------------------------------------
pElement = Nothing
pTextElement = Nothing
pLineSymbol = Nothing
pFillSymbol = Nothing
pTextSymbol = Nothing
pActiveView = Nothing
whiteFill = Nothing
pSymbol = Nothing
myColor = Nothing
pGraphSel = Nothing
pContainer = Nothing
pMap = Nothing
pDisplay = Nothing
pIMxDoc = Nothing
pTextBackground = Nothing
Catch ex As Exception
globalErrorHandler(ex)
End Try
End Sub
Protected Overrides Sub OnUpdate()
End Sub
End Class