How to determine whether running embedded in another app?

C

Chris Vigelius

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
 
W

Wei Lu [MSFT]

Hello Chris,

I would like to suggest you use the Application.Parent preperty to check
which object is your host.

If the application is standalone, the parent will be null.

Hope this helps.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Chris Vigelius

Hello Wei,

thank you for your suggestion, but it does not seem to work as expected:
I would like to suggest you use the Application.Parent preperty to check
which object is your host.

If the application is standalone, the parent will be null.

At least in Office 2003, there is no "Parent" property of the
Application object in PPT. In Excel and Word this property exists, but
it always points to the application itself, regardless of whether it
runs embedded or not.

Maybe you did mean another property?

regards,
chris
 
W

Wei Lu [MSFT]

Hello Chris,

I will performing some research on it. I appreciate your patience.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei Lu [MSFT]

Hello Chris,

Have you tried the IsInPlace property in workbook?


Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top