How to determine whether running embedded in another app?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello,

sorry if this is a FAQ, but how is it possible to find out whether the
office app calling my COM add in is embedded into another office
document? I need to differentiate between the two cases:

a.) if the application hosting the add-in is running standalone

b.) if the application is running embedded (e.g. Excel embedded as
object into PowerPoint)

thanks,
chris
.