Why is there an Application.Activate method for Word but not Excel?

The Word.Application object provides the .Activate method.

Excel.Application object, on the other hand, provides only the .ActivateMicrosoftApp method, which performs a significantly different function for "activating this particular application object."

Why is there no Excel.Application.Activate method?

+5
source share
1 answer

The boring answer: because Word.Application and Excel.Application are completely different types, with completely different implementations.

Outlook.Application does not expose an Activate element. Heck, he doesn't even reveal the Run method.

I'm not even sure that these Application classes have anything more than a type name. There is a basic “contract” that needs to be executed (for example, the top-level object of the VBE node must have a Name ), but things like Activate and Run are not part of this contract. As far as I know, the “contract” is more connected with plumbing than with the interface visible to VBA (for example, set IStream for all components and implement IStorage so that VBE knows where and how to save the code).

+8
source

All Articles