I will selected one feature in ArcMap that feature zoom in viewer window in ArcMap i tried in ArcMap VBA but no result
Public Sub zoomtool()
Dim pDoc As IMxDocument
Set pDoc = ThisDocument
Dim pMap As IMap
Set pMap = pDoc.FocusMap
———————————————–Here how to call viewer window
Set act = pMap
Dim pLayer As IFeatureLayer
Dim pFSel As IFeatureSelection
For i = 0 To pMap.LayerCount - 1
Set pLayer = pMap.Layer(i)
Set pFSel = pLayer
'Get the selected features
Dim pSelSet As ISelectionSet
Set pSelSet = pFSel.SelectionSet
Dim pEnumGeom As IEnumGeometry
Dim pEnumGeomBind As IEnumGeometryBind
Set pEnumGeom = New EnumFeatureGeometry
Set pEnumGeomBind = pEnumGeom
pEnumGeomBind.BindGeometrySource Nothing, pSelSet
Dim pGeomFactory As IGeometryFactory
Set pGeomFactory = New GeometryEnvironment
Dim pGeom As IGeometry
Set pGeom = pGeomFactory.CreateGeometryFromEnumerator(pEnumGeom)
pDoc.ActiveView.Extent = pGeom.Envelope
pDoc.ActiveView.Refresh
Next i
End Sub