Opened by another office documents

  • Thread starter Thread starter Maneesh S
  • Start date Start date
M

Maneesh S

For Office application how do I tell if the application was opened by right
click->open from another office document. For eg. Excel opened from word via
a right click ->Open on embedded excel doc in word or powerpoint. Is there an
api that differentiate how the excel is opned.

I noticed that when excel is opened from embedded object in another office
application the Menus items are slightly different than when excel is opened
directly.
 
Hi,

There is nothing in the document to tell you this. You might be able to
write VBA code to detect it using Application.Caller

If your programming this look up Caller in the help system
 
Thanks for the input,

I have a custom dialog for excel that is called in
HandleBeforeCloseWorKbookClose event. I do not want to call the custom dialog
when excel is opened from embedded object in another office application, like
embedded excel in word, right click->open , this start excel and open the
worksheet in excel application instead. This is where I want to detect if
this is excel worksheet is embedded in another application.

Will Application.caller work in this case.

Thanks
 
Back
Top