none
On a machine with 2 versions of Outlook installed (lets say 2013 C2R and 2010 MSI), is there a way to know programmatically which version of Outlook got closed recently? RRS feed

  • Question

  • Hi,

    I have a machine with 2 versions of Outlook installed (lets say 2013 C2R and 2010 MSI). My requirement is, I need to launch the version of Outlook that's closed recently by the user. Is there a way to know this programmatically about which version of Outlook closed recently and launch the corresponding version?

    Thanks in advance.


    Prasad


    • Edited by Prasad U S Monday, June 15, 2015 10:56 AM
    • Moved by Cindy Meister MVP Monday, June 15, 2015 6:15 PM Outlook, not using VSTO technology
    Monday, June 15, 2015 10:56 AM

Answers

  • Hello Prasad,

    No, Windows doesn't provide the list of recently running applications. You may find the list of recently used files, but not applications.

    If your add-in was run in Outlook which should be opened anew, you may consider creating a windows registry key or setting anywhere in the .config files to mention explicitly what version to run.

    You may try to use the following code to run a specific Office application version:

    oApp = Activator.CreateInstance(Type.GetTypeFromProgID("Outlook.Application.14")) as Microsoft.Office.Interop.Outlook.Application;
    where "Outlook.Application.14" stands for Outlook 2010. 15 for Outlook 2013.

    Monday, June 15, 2015 12:29 PM

All replies

  • Hello Prasad,

    No, Windows doesn't provide the list of recently running applications. You may find the list of recently used files, but not applications.

    If your add-in was run in Outlook which should be opened anew, you may consider creating a windows registry key or setting anywhere in the .config files to mention explicitly what version to run.

    You may try to use the following code to run a specific Office application version:

    oApp = Activator.CreateInstance(Type.GetTypeFromProgID("Outlook.Application.14")) as Microsoft.Office.Interop.Outlook.Application;
    where "Outlook.Application.14" stands for Outlook 2010. 15 for Outlook 2013.

    Monday, June 15, 2015 12:29 PM
  • Hi Eugene,

    Thanks for the reply.

    Regarding the code that you have mentioned, if I set Outlook 2010 (or 2013) as my default application, is there a way to know that (apart from registry HKCU\Software\Classes)? By this way, I will try to start the default Outlook version instead.

    Thanks in advance.


    Prasad

    Monday, June 15, 2015 2:49 PM
  • Prasad,

    Try to play with the ProcessMonitor utility when you set the default Outlook version.

    Tuesday, June 16, 2015 6:56 PM