地图中插入ole对象

回复 #1 maer2008 的帖子

参考如下代码:
Dim pDoc As IMxDocument
Dim pPageLayout As IPageLayout
Dim pGraphContainer As IGraphicsContainer
Set pDoc = ThisDocument
Set pPageLayout = pDoc.PageLayout
Set pGraphContainer = pPageLayout
  
Dim pElement As IElement
pGraphContainer.Reset
Set pElement = pGraphContainer.Next
While Not pElement Is Nothing
  If TypeOf pElement Is IOleFrame Then
    Dim pOleFrame As IOleFrame
    Set pOleFrame = pElement
    pOleFrame.EditProperties
  End If
  Set pElement = pGraphContainer.Next
Wend

如果是图就用IOlePictureElement
posted @ 2009-03-12 15:38  闫磊博客  阅读(453)  评论(0)    收藏  举报