HOW TO
This document shows how to use IGraphicsContainer::FindFrame to find the map frame that contains the specified map.
Note:
Code in the project's ThisDocument code module will only run in the current map document. If you want to store the code in all your map documents, open the Normal.mxt ThisDocument code module instead.
Code:
Sub FindFrame()
Dim pDoc As IMxDocument
Dim pGraphicsContainer As IGraphicsContainer
Dim pMapFrame As IMapFrame
Set pDoc = ThisDocument
Set pGraphicsContainer = pDoc.PageLayout
'Get the Map Frame for the first map in the document.
Set pMapFrame = pGraphicsContainer.FindFrame(pDoc.Maps.Item(0))
End Sub
Article ID:000004932
Get help from ArcGIS experts
Download the Esri Support App