Thanks Ron for the quick answer. As I understand things, when I tried your approach previously, by using getObject on MS Word, it was not satisfactory for my needs because it started a new session, and what I needed was to know what the current user's session was doing.
I'll do some experimenting using your suggestion, it sounds like your saying that I can get to info about the current user's interaction with Outlook, by using getObject or CreateObject, and I'm guessing that's because Outlook isn't multi-threaded, and only allows one instance? thanks again, Chip ------------------------------ Chip Orange Database Administrator Florida Public Service Commission [email protected] (850) 413-6314 (Any opinions expressed are solely those of the author and do not necessarily reflect those of the Florida Public Service Commission.) > -----Original Message----- > From: Ron Parker [mailto:[email protected]] > Sent: Wednesday, June 03, 2009 2:28 PM > To: [email protected] > Subject: Re: a question for GW (or others) > > 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. > > >
