locked
Check Availabilty Word 2007 in Computer using C# RRS feed

  • Question

  • Hi all, sorry if my question in wrong category. I've used Interop.Word 12.0 to automate my word document using C# in my WindowsForm Application. My application will deploy in other computer that Word 2007 maybe not installed. Can I check the computer Word 2007 availabiity using C#? I want check it first before open that document using Process.Start(@"document_location/document.docx"). Thanks all.
    Friday, July 8, 2011 11:29 AM

Answers

  • There's a couple ways that should work.

    If Word is open you can check the value of Word.Application.Version for the value 12.0

    If it's not open you can look at the HKLM registry for this:

    "SOFTWARE\\Microsoft\\Office\\12.0\\Word\\InstallRoot" and if it's not there then version 12 is not loaded on the system.


    Kind Regards, Rich ... http://greatcirclelearning.com
    Friday, July 8, 2011 12:21 PM

All replies

  • There's a couple ways that should work.

    If Word is open you can check the value of Word.Application.Version for the value 12.0

    If it's not open you can look at the HKLM registry for this:

    "SOFTWARE\\Microsoft\\Office\\12.0\\Word\\InstallRoot" and if it's not there then version 12 is not loaded on the system.


    Kind Regards, Rich ... http://greatcirclelearning.com
    Friday, July 8, 2011 12:21 PM
  • Knowing that Word 2007 is installed does not mean that you can guarantee that it is the default version. You would be best to start Word (if not already running) and check the Application.Version as per Rich's post.
     

    Enjoy,
    Tony
    www.WordArticles.com
    Saturday, July 9, 2011 12:42 PM