none
A single AddOn that runs on all versions of Word RRS feed

  • Question

  • Hi;

    We have a customer that has both Word 2003 and 2007 installed. He has requested that we have our AddIn work on both, where you get the ribbon UI on 2007. What is the best way to do this? (I know the Office team says don't install side by side - but the world is what it is.)

    thanks - dave


    Very funny video - What's your Metaphor?
    Tuesday, May 3, 2011 2:31 PM

All replies

  • Hi Dave

    Have you seen these discussions

    http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/25cfd59d-0fb5-43b1-a032-fb1aa008e234
    http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/5b2f5387-930a-4932-bae0-f42ddbd9cbc6/
    http://social.msdn.microsoft.com/Forums/en-GB/exceldev/thread/0e7942c9-4bdb-479b-a6b5-1bfbb861c63c

    Although I'm not sure anyone was trying to run this in a "mixed" environment, where the user could conceivably start up both interfaces simultaneously...

    FWIW the safest way to go would be to use the CommandBars interface, only. The customer would just have to access the commands via the Add-ins tab on the Ribbon.


    Cindy Meister, VSTO/Word MVP
    Wednesday, May 4, 2011 6:25 AM
    Moderator
  • Hi Dave,

    A suggestion: don't use permanent command bars and command bar controls in your add-in. When uninstalling such an add-in, you need to run Word and remove those command bars/controls but the problem is: you cannot be sure which Word version will be run when you start Word programmatically. More specifically, there's some simple rule which I can't remember at the moment, sort of "when starting Word programmatically on a machine with several Word versions installed, you'll actually run the Word version which was last run by the user". You can try deducing this rule yourself. Also, I suggest that you read http://support.microsoft.com/kb/2121447; pay attention, the page contains links to previous versions of that article.

    And another point. Word saves custom command bar controls added to a built-in command bar EVEN if the controls are temporary. That is, such controls are treated as permanent and the stuff above applies to them. I hope you know that main menus and context menus in Office 2000-2007 are built-in command bars.


    Regards from Belarus (GMT + 2),

    Andrei Smolin
    Add-in Express Team Leader
    Wednesday, May 4, 2011 8:44 AM
  • Hi Cindy & Andrei;

    We definitely want to use the ribbon in 2007/2010 - we make incredible use of it for our AddIn such that you rarely need to bring up dialog boxes. The request we have comes from a customer who has 2003 & 2007 installed side by side. He only runs one at a time. For Acrobat, Snag-It, etc. it displays using the Ribbon UI under 2007 and in the regular menu under 2003. So they intelligently switch.

    We have places in out code that are Word 2000 different as well as Word 2010 different - and of course a lot of Word 2003- vs 2007+ different.

    One thing I was thinking, maybe have a single shim and that shim calls the appropiate main dll based on the version running. Do you think that would be a good approach? And if so, can the shim query Word to find out what version it is?

    That does still leave the issue that the 2003 version will leave itself in the AddIn ribbon button in 2007. But that's I think a survivable side effect. On the plus side, when someone upgrades Word, they'll get the new UI for our AddIn immediately.

    ??? - thanks - dave


    Very funny video - What's your Metaphor?
    Wednesday, May 4, 2011 1:32 PM
  • Hi Dave,

    > For Acrobat, Snag-It, etc. it displays using the Ribbon UI under 2007 and in the regular menu under 2003. So they intelligently switch.

    Your add-in can determine the Word version which loads the add-in and supply corresponding UI elements. I don't think this is a problem.

    > And if so, can the shim query Word to find out what version it is?

    Yes. Note you can also do this on the add-in level.

    > That does still leave the issue that the 2003 version will leave itself in the AddIn ribbon button in 2007.

    If you don't create non-temporary command bars or command bar controls, if you don't add temporary command bar controls onto built-in command bars, then I don't see how a COM add-in can leave anything on the Add-ins Ribbon tab. Am I missing anything?


    Regards from Belarus (GMT + 2),

    Andrei Smolin
    Add-in Express Team Leader
    Wednesday, May 4, 2011 3:29 PM
  • > That does still leave the issue that the 2003 version will leave itself in the AddIn ribbon button in 2007.

    If you don't create non-temporary command bars or command bar controls, if you don't add temporary command bar controls onto built-in command bars, then I don't see how a COM add-in can leave anything on the Add-ins Ribbon tab. Am I missing anything?

    We found the menus didn't work right in 2000/2/3 if they were set to temporary. So we have them set to permanent. I don't remember the specific reason why - just that we went through a lot of contortions and ended up that non-temporary was required.

    This doesn't bother me too much - it's not terribly noticable and someone doing this will probably have other old-style AddIns also in that tab.

    thanks - dave

    ps - How do you think Belarus will do next week in Dusseldorf?


    Very funny video - What's your Metaphor?
    Thursday, May 5, 2011 9:03 PM