MAPI32.dll throws errorEither there is no default mail client

Frank8472 1 Reputation point
2020-08-20T12:22:23.47+00:00

Hi@all ,

I have a problem with mapi32.dll Version 1.0.2536 (Product-Version 10.0.18362.145) --> I get the message 'Either there is no default mail client....' when I run the following little test programm: The "crashing"-method is "SignOn()".

Dim mapi_session = CreateObject("MSMAPI.MAPISession")  
Dim mapi_mailmessage = CreateObject("MSMAPI.MAPIMessages")  
  
mapi_session.SignOn()  
mapi_mailmessage.SessionID = mapi_session.SessionID  
  
With mapi_mailmessage  
     .Compose()  
     .RecipAddress = "test@test.com"  
     .MsgSubject = "TestMail"  
     .MsgNoteText = "Hello"  
     .Send(True)  
End With  
             
mapi_session.SignOff()  

I've found an alternative mapi32.dll version in the web (1.0.3157.0; Product-Version 1.0). My program works with this version. Negativ side-effect: When I try to use the "send as mail" button in Excel 2016 with this mapi version, Excel 2016 crashes. Word 2016 works, Word/Excel 2010 works, too! I know this error message from my outlook times. It was stored in the registry key "PreFirstRun" under .\clients\mail but this key doesn't exist.

Is this a bug in the actual mapi32.dll?

EDIT: I am using the reference MSMAPI32.OCX (Microsoft MAPI Controls 6.0)

regards, Frank

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,498 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Fan Fan 15,321 Reputation points Microsoft Vendor
    2020-08-23T23:44:39.447+00:00

    Hi,
    I'm sorry for not familiar with the topic,
    I would do more research about this topic ,if there any information , i would update here.
    At the same time ,i would recommend you ask advice from the MSDN team at the following address:
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=Profile

    Best Regards,


  2. Frank8472 1 Reputation point
    2020-08-31T08:27:08.127+00:00

    Thank you for your Answer. I followed your recommendation and ask my question here, too:

    mapi32dll-throws-erroreither-there-is-no-default-mail-client

    regards,
    Frank

    0 comments No comments