none
Customer upgraded Office - my app is blowing up - what to do RRS feed

  • Question

  • Good day. I wrote an app for a customer who was using Office 2003 which references the Word and Excel object/interop libraries. Now they have upgraded to Office 2007, which I do not have. Is there some way I can upgrade my app without actually having to buy Office 2007 - even if I wanted to, it is getting very hard to find retail.

    Thanks!

    Monday, December 6, 2010 2:38 PM

Answers

  • So there is no way to develop an app that can be used in an Office environment without having that version of Office installed on the development machine?


    The one exception is if you're working with Visual Studio 2010. That has an option to embed the types used in your solution in the project, making it PIA- (and version-) independent.

    Some of the links on this search page provide more information:

    http://social.msdn.microsoft.com/Search/en-US?query=%22embedded%20type%22%20Office&ac=8


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by RbrtMcK Monday, December 6, 2010 6:49 PM
    Monday, December 6, 2010 6:41 PM
    Moderator

All replies

  • If you want to support a (paying) customer on 2007, you really must have a 2007 system - perhaps the customer will let you work on his system. Alternatively, you may be able to identify the problem on 2010 - it really depends what it is!
     

    Enjoy,
    Tony
    www.WordArticles.com
    Monday, December 6, 2010 5:16 PM
  • The customer is on a different continent. Can I not just install the 2007 interop library?
    Monday, December 6, 2010 5:19 PM
  • The customer is on a different continent. Can I not just install the 2007 interop library?

    No, it doesn't work that way. The Office version must be installed on the development machine in order to have the PIAs ("interop library") install.
    Cindy Meister, VSTO/Word MVP
    Monday, December 6, 2010 5:50 PM
    Moderator
  • So there is no way to develop an app that can be used in an Office environment without having that version of Office installed on the development machine?
    Monday, December 6, 2010 6:01 PM
  • Cindy knows much more about this than I, but I believe it's more restrictive than that, depending on what tools you are using.
     

    Enjoy,
    Tony
    www.WordArticles.com
    Monday, December 6, 2010 6:07 PM
  • Thanks. Here's another question. Is it possible to have both Office 2003 and Office 2007 installed on the same machine? Or is it necessary? If I install Office 2007 can I assume downward compatibility?
    Monday, December 6, 2010 6:25 PM
  • So there is no way to develop an app that can be used in an Office environment without having that version of Office installed on the development machine?


    The one exception is if you're working with Visual Studio 2010. That has an option to embed the types used in your solution in the project, making it PIA- (and version-) independent.

    Some of the links on this search page provide more information:

    http://social.msdn.microsoft.com/Search/en-US?query=%22embedded%20type%22%20Office&ac=8


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by RbrtMcK Monday, December 6, 2010 6:49 PM
    Monday, December 6, 2010 6:41 PM
    Moderator
  • Thanks Cindy! If I install Office 2007 and recompile will my app be downward compatible for machines running Office 2003?
    Monday, December 6, 2010 6:52 PM
  • Yes, you can install both versions of Office (install the earlier one first) but you can't count on downward compatibility; it is more normal to have upward compatibility and I suspect your problem is minor - probably a single thing that's been removed in 2007 (there's a list somewhere on technet or MSDN but I don't have a link handy).
     
     

    Enjoy,
    Tony
    www.WordArticles.com
    Monday, December 6, 2010 7:12 PM
  • Thanks Cindy! If I install Office 2007 and recompile will my app be downward compatible for machines running Office 2003?


    Hi Rbrt

    Only if you're using Visual Studio 2010.

    If that's not an option, then you'd have to remove all references to the PIAs and modify your code to use late-binding (PInvoke = GetType().InvokeMember()).


    Cindy Meister, VSTO/Word MVP
    Monday, December 6, 2010 7:26 PM
    Moderator
  • Thanks. Here's another question. Is it possible to have both Office 2003 and Office 2007 installed on the same machine? Or is it necessary? If I install Office 2007 can I assume downward compatibility?


    Hi Robert

    It's possible to install two versions in parallel, but the result may not be "usable" in the development context. Certain things will be the same in the Registry for both versions and that "sameness" may not be compatible for one version or another.

    Much better would be to invest in Virtual Machine software (I use VMWare, others use Virtual PC) and install exactly the development environment you require (and that the client machines will be using).


    Cindy Meister, VSTO/Word MVP
    Monday, December 6, 2010 7:29 PM
    Moderator
  • OMG. Why would anybody develop apps based on Microsoft Office? What a rat's nest!

    Thanks for your answers, though.

    Monday, December 6, 2010 7:50 PM