Chip Orange wrote:
I make use of the nativeObjectModel window property to get the MS Word object model; can anyone tell me why the same line yields an error when used in MS Outlook?
It fails because Outlook doesn't respond appropriately to the related WM_GETOBJECT message, and it's not Internet Explorer (which also doesn't respond appropriately, but which we handled anyway because it can respond to other WM_GETOBJECT messages with a value we can massage appropriately.) Your best bet, if you're wanting the object that corresponds to the active Outlook window, is to GetObject an Outlook.Application object and look at its ActiveWindow property (which is either an Explorer or an Inspector object; Outlook doesn't have a Window object as such.)
At least if it were empty I could ask why it's not available, but I don't understand at all why this is generating an error?
It fails with an error because attempting to get the native object model for something you haven't verified in some other way is a window that should support it is a pretty fundamental error, so we decided it was best if you knew about it as soon as possible rather than just propagating the error to another, less obvious part of your code.
