Determining the host application of a shared add-in?
- From: andreas.baus@xxxxxxxxxxxxx
- Date: 8 Aug 2005 01:12:55 -0700
What is the best (most reliable) way to determine which Office
application is hosting an shared addin? In other words, in the
OnConnection method, I just get a reference to a generic object, but if
the addin is supposed to be able to work with either (for example)
Word, Excel or PowerPoint, how do I figure out which of them loaded it
so I can branch to application-specific code wherever necessary?
I tried force casting the object to Word.Application, Excel.Application
etc., catching exceptions until I find a cast that doesn't fail, but
that has the unpleasant side effect that for each failed cast, the
loading of the host application is delayed a small, but noticeable
amount of time. Surely there must be a more elgant way? Thanks in
advance to anyone who can give me some ideas.
.
- Follow-Ups:
- Prev by Date: RE: PowerPoint Memory Error (PowerCom)
- Next by Date: Help Creating an Outlook Add-In
- Previous by thread: Addin Deployment Issue
- Next by thread: RE: Determining the host application of a shared add-in?
- Index(es):