none
Type Mismatch on add-in load RRS feed

  • Question

  • Hi,

    I've created a VBA add-in as a global template, with customUI and customUI14 XML files for compatibility with Word 2007 and Word 2010. Everything works pretty well on my machine (Win 7 on a 64-bit machine, Word 2010 32-bit) and on most of the other machines I've tested it on (a mix of Word 2010 and 2007, mostly XP, all 32 bit). However, my boss gets a Type Mismatch error whenever he opens a new document. Oddly, his machine is most similar to mine (Word 2010 32 bit, Win 7 on a 64-bit machine). I've tried placing debug code at the very start of the ribbon onLoad subroutine (which I assume is the first piece of VBA code that is actually called) but the Type Mismatch occurs before that. I'm assuming it is either occurring when the IRibbonUI gets passed to the onLoad action, or that it is somehow occurring in the customUI XML. Everything works correctly and I have the option checked to show add-in UI errors (nothing comes up).

    I don't know any debugging methods for customUI, other than validating it (it is valid). Can anyone provide any suggestions on how to move forward with tracking this down? I assume if it happens for him it might happen for clients.

    Thanks in advance. I'd be happy to post some code, but I have no idea what might be relevant given that the error seems to be triggered before the code does its thing.

    Wednesday, January 30, 2013 10:08 PM

All replies

  • First look on VBE references box.

    If you have MISSING before control name, that means you should add and register one.

    But truly, you would to add some link to project or part of code with warning (you can make test, cutting some procedures to eliminate non problem lines).


    Oskar Shon, Office System MVP

    Press if Helpful; Answer when a problem solved

    Thursday, January 31, 2013 4:20 PM
    Answerer
  • I did check the references and they are all there.

    I'm not sure what you mean by cutting some procedures; as I mentioned, the type mismatch occurs before any of my code actually runs. It seems to occur as the ribbon is being loaded, but I don't know of any way to isolate the problem before that.

    Thursday, January 31, 2013 5:19 PM