Discussion:
Accessing COMAddins giving error when accessed from external appli
(too old to reply)
Santy
2009-05-03 05:08:01 UTC
Permalink
Hi,

I have a COM Addin that works fine on Office XP, 2003 and also on 2007.
However, I am running into a very annoying problem which i am not able to
resolve.
This machine with Vista OS had Office 2007 earlier and now it has been
unistalled.

If I re-install Office 2007 on this machine, everything works fine. But as
soon as I unistall it and install Offixe XP or 2003, the problem resurfaces.

Nature of the problem:
After looking at the problem, I found that the Addin is correctly loading as
soon as I start the Word application. But when I am trying to get the object
of this addin to an external application thru COMAddins it gives an error.
However, when I try to access the COMAddins collection within Word VB editor
it works fine.
Actually, the external application cannot even access the
WordApplication.COMAddins function itself. It gives an error "Method
'COMAddins' of object '_application' failed". The problem also occurs if I
run the Addin in debug mode, but I understand that when I am running it in
debug mode then it is effectively a separate app...

I have been searching for a solution and tried many a things but nothing is
working and I am completely stuck...
- The machine did not have the PIA for Office 2007.
- I manually deleted VBA folder and repaired it.
- Tried to remove any files/registry keys of Office 2007 to best of my
knowledge.
- I have checked the references in my Addin and the external application as
well. No problem with the codebase, since it is working fine elsewhere.

Any help is appreciated. This is my last option now, I have tried as much I
could do on my own :)

Thanks,
Santy
Cindy M.
2009-05-05 18:25:24 UTC
Permalink
Hi Santy,

You'll notice that the full newsgroup name of this group is word.VBA.addins.
Since a COM Add-in can't really be written in VBA, you're going to have better
luck with your question in the office.developer.com.add_ins newsgroup, I think.

FWIW, most often in this kind of scenario (Office 2007 was once on the machine)
the problem is usually a reference to the 2007 PIAs still in the Registry. You
mention you've removed the PIAs and checked the Registry, but I think you may
need to check again.

You might want to take a look at the last message in the following forum
discussion. It's actually about getting VSTO to work, but the steps outlined
there might help you, too...
Post by Santy
I have a COM Addin that works fine on Office XP, 2003 and also on 2007.
However, I am running into a very annoying problem which i am not able to
resolve.
This machine with Vista OS had Office 2007 earlier and now it has been
unistalled.
If I re-install Office 2007 on this machine, everything works fine. But as
soon as I unistall it and install Offixe XP or 2003, the problem resurfaces.
After looking at the problem, I found that the Addin is correctly loading as
soon as I start the Word application. But when I am trying to get the object
of this addin to an external application thru COMAddins it gives an error.
However, when I try to access the COMAddins collection within Word VB editor
it works fine.
Actually, the external application cannot even access the
WordApplication.COMAddins function itself. It gives an error "Method
'COMAddins' of object '_application' failed". The problem also occurs if I
run the Addin in debug mode, but I understand that when I am running it in
debug mode then it is effectively a separate app...
I have been searching for a solution and tried many a things but nothing is
working and I am completely stuck...
- The machine did not have the PIA for Office 2007.
- I manually deleted VBA folder and repaired it.
- Tried to remove any files/registry keys of Office 2007 to best of my
knowledge.
- I have checked the references in my Addin and the external application as
well. No problem with the codebase, since it is working fine elsewhere.
Any help is appreciated. This is my last option now, I have tried as much I
could do on my own :)
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

Loading...