PROBLEM
When using the IBasicGeoprocessor Dissolve method and adding the result to the map the field aliases of the dissolve result (as seen in the field headings of the layer's attribute table) are incorrect.
Aliases are not correctly assigned when adding the dissolve output into ArcMap using VBA. Aliases are assigned correctly when using the Dissolve from the GeoProcessing Wizard. No field aliases will be assigned if you do not add the output to ArcMap programmatically.
Code:
Set pLayer = New FeatureLayer
Set pLayer.FeatureClass = pOutputFC
pLayer.Name = pOutputFC.AliasName
pMxDoc.FocusMap.AddLayer pLayer
Dim pTFlds As ITableFields
Set pTFlds = pLayer
Dim pFldInfo As IFieldInfo
Dim i As Integer
For i = 0 To pTFlds.FieldCount - 1
Set pFldInfo = pTFlds.FieldInfo(i)
pFldInfo.Alias = pTFlds.Field(i).Name
Next i
Get help from ArcGIS experts
Download the Esri Support App