none
MAPI item.display not supported error RRS feed

  • Question

  • In the code snip below I get the error "MAPI_E_INTERFACE_NOT_SUPPORTED" on the line "Item.Display".  Only on one system running Office 2010.  Code has been in place several years but error just noticed a few days ago.  Other systems running Office 7 or Office 2016 the code works OK.

    Ideas?

    Thursday, February 8, 2018 5:44 PM

All replies

  • Hi Steve Staab,

    Check that whether you are connected with Exchange or not on that machine.

    If it is connected then check and make sure that user have full control.

    Also I suggest you to post sample code in code block and don't post the image of the code.

    Try to check on your side and let us know about your testing result.

    We will try to provide you further suggestions to solve the issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 9, 2018 5:39 AM
    Moderator
  • The code line "Item.Send" works so I doubt it is a connection issue.

    here is the code snippet.

    Public Sub SendSingleEmail(bolNote As Boolean)
    On Error GoTo Err_SendSingleEmail
    
        Dim Session As vbMAPI_Session
        Dim Item As vbMAPI_MailItem
        Dim Folder As vbMAPI_Folder
    
        Set Session = vbMAPI_Init.NewSession
        Session.LogOn
    
        Set Folder = Session.GetDefaultFolder(FolderType_Outbox)
        Set Item = Folder.Items.Add
    
        Item.To_ = strEmailAddress
        Item.CC = strCoachEmail
    
        Item.Subject = strSubject
      '  Item.HTMLBody = DLookup("EmailText", "EmailBody", "ContestID = 61")
        If Not IsNull(strMessage) Then Item.Body = strMessage
        If Not IsNull(strTempPath) Then Item.Attachments.Add strTempPath   ' add a report or document as an attachment
    
        If bolNote Then   ' -1 is true
            Item.Display   ' opens outlook in edit mode  w/note
        Else
            Item.Send       ' Session.OutlookSendReceiveAll
        End If
         
       ' Session.OutlookSendReceiveAll
        
        Set Item = Nothing
        Set Folder = Nothing
        Set Session = Nothing
        
    Exit_SendSingleEmail:

    Friday, February 9, 2018 3:43 PM
  • Hi Steve Staab,

    If you just run the code below for testing purpose.

    Does it execute successfully and display the mail?

    Sub demo()
    Dim MyItem As Outlook.MailItem
    
     Set MyItem = Application.CreateItem(olMailItem)
     MyItem.Subject = "Status Report"
     MyItem.To = "xyz user"
     MyItem.Display
    
    End Sub
    

    Try to run code on your side and let us know about the result.

    We will try to provide further suggestions to solve the issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 12, 2018 2:03 AM
    Moderator
  • Tuesday, February 13, 2018 2:55 PM
  • Hi Steve,

    Where did you use this code?

    For this error, you need to Add Outlook Reference by add Microsoft Outlook 16.0 Object Library.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Saturday, February 24, 2018 5:34 AM
  • Good morning Tao,

    The code is in an Access module using the below:

    vbMAPI - Outlook Security Evader 
     (c) Wayne Phillips / iTech Masters 2010
    http://www.everythingaccess.com     

    Since this code is not native OUTLOOK I did not think adding the Outlook reference would help but I tested this idea anyway.  Adding the Outlook reference did not fix the issue.  Since this is probably a vbMAPI instead of an MS Outlook issue I will contact the website noted above for help. if they are able to provide a solution I will post it here.

    Thanks for your help.

    Saturday, February 24, 2018 5:14 PM
  • Hi Steve,

    It seems you are using the third party product, if you have any update about this issue, please feel free to let us know.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 26, 2018 1:43 AM