Qt World Summit: Register Today!

outlook.exe does not exist

  • https://doc.qt.io/Qt-5/activeqt-activeqt-qutlook-example.html

    I followed this documentation and tried to build a outlook mail web viewer.
    I managed to build but whenever I try to run it gives me:

    Executable D:\Desktop\build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\Outlook.exe does not exist.

    Anyone can help me with this? Thanks

  • You need to have MS Outlook installed and add the path to Outlook.exe to your PATH environmental variable. if you use Qt Creator you can look here

  • @VRonin Thank you for your reply.
    I have MS Outlook installed and I added Outlook.exe to my environment variable
    but it still give me the same error. Am I adding the environment wrongly?

  • @nicholaslee said in outlook.exe does not exist:

    Am I adding the environment wrongly?

    Yes, you are adding a variable named OUTLOOK while you should edit the variable called PATH to add C:\Program Files\Microsoft Office\root\Office16 to the ; separated list

  • @VRonin Thanks for the speedy reply
    I deleted my invalid outlook variable and edited the path variable but it still gives me the same error.
    I tried to remove the last 'OUTLOOK.EXE' but still gives me same error.

  • Does the error still reference D:\Desktop\build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\Outlook.exe ?

    I tried to remove the last 'OUTLOOK.EXE'

    'OUTLOOK.EXE' and the previous slash should be removed as I wrote above

  • Yes it still reference

    Executable D:\Desktop\build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\Outlook.exe does not exist

    I removed \OUTLOOK.EXE

  • Moderators


    your first entry is C:\QT\\5.0.2...
    The double \ is bound to cause trouble.

  • Try putting C:\Program Files\Microsoft Office\root\Office16 at the beginning rather than the end of the list

  • @J-Hilk Tried, thats not the problem

    @VRonin Still gives me the same error

  • Moderators

    Hmmm, the executable name referenced in the .pro file is qutlook not outlook.

    Just saying in case it may be important. I have no experience with QAx* so can't even tell if that info is relevant.

  • Moderators

    @nicholaslee said in outlook.exe does not exist:

    Executable D:\Desktop\build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\Outlook.exe does not exist.

    Wait a moment, I think we're all on the wrong track here, you're not trying to run Microsoft's Outlook.exe, but rather your own qt program, that creates an Outlook.exe as executable file!?

    This seems rather like a build/execute-path problem. In 90% of all cases deleting the Buildfolder, build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug in your case, fixes that.

  • @sierdzio Got that right, my executable name is qutlook

    This is my code, its pretty much the same as the doc from QT
    Code --- https://github.com/nicholasleeeee/Outlook
    QT ----- https://doc.qt.io/Qt-5/activeqt-activeqt-qutlook-example.html

    @J-Hilk I tried deleting and rebuilding but the same error persist.
    Basically what I want to do is to integrate MS Outlook into my app.

  • Lifetime Qt Champion


    You should rather avoid using an already taken name for your application. Depending on what you installed as protections on your machine, that can trigger them into detecting that as some form of attack since the application already exists. And also, as you could realise with this thread, it confuses people.

  • @nicholaslee
    It is unclear why you should ever receive the message:

    Executable D:\Desktop\build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\Outlook.exe does not exist.

    The executable for your project should be that path but with Qutlook.exe instead of Outlook.exe at the end.

    The question is where your Outlook.exe is coming from. I do not believe your app is getting as far as any attempt to use/contact any MS Outlook stuff, it is failing to find the executable of your app to run in the fist place. It seems to be attempting to run the wrong executable name. You could at least test that by having your code output a message very first thing, which I think you will not see.

    Furthermore, the path includes build-Outlook-Desktop_Qt_5_0_2_MinGW_32bit-Debug. Why is that Outlook and not Qutlook? Did you name the project Outlook rather than Qutlook at some point?

    I would look carefully at your project.

Log in to reply