On Jul 29, 4:33 pm, "
<kenslo...@mvps.org> wrote:
> According to the documentation the Open() event will fire if the
> DocumentItem is opened in an Inspector. If it's not opened in an Inspector
> but only in it's native application I wouldn't expect that event to work.
> Check the count of the Inspectors collection before and after opening oneof
> these items and see if a new Inspector has been added to the collection. If
> it has a workaround might be to handle NewInspector() and then check for
> Inspector.CurrentItem.Class in that event handler. DocumentItem supports the
> Class property and if the return from that is OlObjectClass.olDocument (41)
> then you know a DocumentItem is being opened.
> >
> http://www.slovaktech.com
> "mightyCoCo" <mightyc...@googlemail.com> wrote in message
> news:802ee580-a7cf-48c1-9b13-24f9b272f4fa@r38g2000yqn.googlegroups.com...
>
> > Hi,
>
> > I'm using the ItemEvents_10_OpenEventHandler to catch a open (double-
> > click) event on a Outlook item.
> > This works great on MailItem or PostItem types. However, Outlook
> > objects of the type DocumentItem dosen't seem to fire this event.
> > Instead I'm directly presented wih the document in it's native
> > application.
>
> > Is this a known restriction?
> > (Outlook 2007, VS2005)
>
> > thanks in advance,
> > -coco
Hi Ken,
I tried using the NewInspector event handler. It's not fired either,
as Outlook doesn't seem to open an Insspector at all for a
DocumentItem.
Let's say the DocumentItem object in my Inbox is a .html object. If i
select it, in the preview pane the html file is rendered. If i double
click the object, Internet Explorer opens. The double click doesn't
open a new Inspector or triggers the Open event. It seems that Outlook
is directly running the process which is assigned to the object class
(Word for .doc, IE for .html, Notepad for .txt, etc...)
I wonder if I need to set the MessageClass of the object to something
else than IPM.Document, to trigger the event... But i guess, I'd loose
the document-specific icon in the Outlook list view then...
thanks,
-coco