First run of outlook RRS feed

  • Question

  • hi,

    I'm using code from mfcmapi and am encountering a problem.

    When outlook is not installed,

    a pop up will show up (to show that there is no default mail). Hence I check the registry to see if outlook is installed.

    However when outlook is installed (i believe is 2010) but not run before, i still encounter the pop up. Is there a way round this?

    If outlook is installed and have been initialized (run before), the code works fine. 

    Monday, June 3, 2013 1:53 AM

All replies

  • What is your code?  Is this an add-in?  What are you trying to accomplish?

    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Monday, June 3, 2013 2:55 PM
  • hi. thanks for the reply. i was away. i am using a c++ code on our own product and have based primarily on MFCMAPI to work on.

    sometimes the product work in the background, hence we do not want unnecessary popup

    if outlook is not installed, it will not be initialized

    if outlook is installed and run before, the product works fine with the below code

    if outlook is installed and not run before (office 2010) or have some corruption, the following code pops up a dialog "Either there is no default mail client or the current mail client cannot fulfill the messaging request" i did try and check the various dll (e.g. mapi32.dll) and they were present. Do you guys have any suggestion on how to mitigate this error?

    i have the following code.



    m_init = isMAPIAvailable();
        if (!m_init)
            m_error = _CSTR(MAPI_FAILED_NOT_INSTALLED);



    #define MAPI_REG_KEY "Software\\Microsoft\\Windows Messaging Subsystem\\MSMapiApps"
    #define OUTLOOK_REG_KEY "Software\\Clients\\Mail\\Microsoft Outlook"

    bool isMAPIAvailable()
        cstring regkey(MAPI_REG_KEY);
        cstring outlookregkey(OUTLOOK_REG_KEY);

        // if server 2008, etc does not have outlook, it will not have both keys
        // for windows 7, it will have MAPI_REG_KEY but not OUTLOOK_RE_KEY
        return (Platform::WinRegReader::checkRegKeyExists(Platform::WinRegReader::LOCAL_MACHINE,
                    regkey.c_str()) &&

    Tuesday, June 11, 2013 4:00 AM
  • I don't have experience with this one - maybe Dmitry can offer some advice.

    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Tuesday, June 11, 2013 1:58 PM
  • I took a further look and testing.

    it seems like the outlook is x64 while the application is x32, hence the error. 

    Also, if the outlook is x32, while the application is x64, it gives the same error too (correct me if im wrong)

    so i did a registry check to check on the fields..

    probably there should be an api in msmapi32 to check on compatibility of the outlook with the application. there would be alot easier for developer.

    Wednesday, June 12, 2013 4:04 AM