bilal_ini

erreur de compilation

Discussion created by bilal_ini on Jun 18, 2014
bonjour,

j'ai une erreur de compilation qui m'indique que l'instruction suivante (pEnumElement.Reset) [type mismatch].
Dim pMxDoc As IMxDocument
Dim pGraphicsContainer As IGraphicsContainer
Dim pPageLayout As IPageLayout
Dim pEnumElement As IEnumElement
Dim pTextElement As ITextElement
Dim pElement As IElement


Private Function MxDocument_OpenDocument() As Boolean
    Set pMxDoc = ThisDocument
    Set pPageLayout = pMxDoc.PageLayout
    Set pGraphicsContainer = pPageLayout
   
    Dim pPoint As IPoint
    Set pPoint = New Point
   
    'enter the x and y values of your text element here
    pPoint.X = 8.77251
    pPoint.Y = 0.552581
   
   
    Set pEnumElement = pGraphicsContainer.LocateElements(pPoint, 0.05)
   
    pEnumElement.Reset
    Set pElement = pEnumElement.Next
    If TypeOf pElement Is ITextElement Then
        pGraphicsContainer.DeleteElement pElement
        Call Project.AddDate.AddText
        Exit Function
    End If
   
End Function


merci à tout le monde

Outcomes