Re: Item_Open and NewInspector events not triggered?
From: Ken Slovak - [MVP - Outlook] (kenslovak_at_mvps.org)
Date: 02/19/04
- Next message: Ken Slovak - [MVP - Outlook]: "Re: getitemfromid and outlook reminders"
- Previous message: Ken Slovak - [MVP - Outlook]: "Re: How to read a unicode registry value?"
- In reply to: NilovSerge: "Item_Open and NewInspector events not triggered?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Feb 2004 10:19:05 -0500
If you are using WordMail with Outlook 2000 then NewInspector and
various other event may not fire and are unreliable.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginners Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "NilovSerge" <NilovSerge.11v0ep@outlookforum.com> wrote in message news:NilovSerge.11v0ep@outlookforum.com... > > Hallo! > I need opening my form(based on mailItem) and hide some standard > buttons(Reply,Replay all...) > and open my own toolbar with commandbuttons to make some task. I > managed with showing/hiding toolbars > and commandbuttons on it. The problem is that opening creating a new > mail or opening an existing one(my for > or standart mail) I not ALWAYS get event objContactItem_Open > I define if that is my form : > ' Declaration of events objects > Dim myOlApp As New Outlook.Application > Private WithEvents olInboxItems As Items > Public WithEvents myOlExp As Outlook.Explorer > Public WithEvents myOlInspectors As Outlook.Inspectors > Public WithEvents objContactItem As Outlook.MailItem ' Object for > Events of mailItem > > > Private Sub Application_Startup() ' Create Inspector object > Set myOlInspectors = myOlApp.Inspectors > .. > End Sub > > > Private Sub myOlInspectors_NewInspector(ByVal Inspector As > Outlook.Inspector) > Dim TempObject As Object > On Error Resume Next > Inspector.WindowState = olMaximized ' Maximize the inspector > > Set TempObject = Inspector.CurrentItem > If Not TypeOf TempObject Is Outlook.MailItem Then > Exit Sub ' If that is not a mailItem - hide toolbar with > commandbars > End If > Set objContactItem = TempObject ' Create object of event ONLY for > mailItems > End Sub ' This event very often not triggered! > > > Private Sub objContactItem_Open(Cancel As Boolean) ' This event very > often not triggered! > Dim Item As Object > On Error Resume Next > If Not TypeOf objContactItem Is Outlook.MailItem Then > ShowDocSignToolBar (False) ' if this control comes to this function > than ALL WRIGHT ! > Exit Sub ' If that is not a mailItem - hide toolbar with > commandbars > End If > .. > end sub > .. > I don't know why but events objContactItem_Open and > myOlInspectors_NewInspector very often are not triggered! > But as I understand these event must be triggered any time as I open > new or existing mail. I set breakpoints > in these events but they not allways works. And as a result opening my > form very often I don't see my toolbar > and in simple mails I see my toolbar though I tried to hide it! > I use OutLook 2000 SP-(9.0.0.6627) russian version. What is wrong? > > > ------------------------------------------------ > ~~ Message posted from http://www.ExcelTip.com/ > ~~View and post usenet messages directly from http://www.ExcelForum.com/ >
- Next message: Ken Slovak - [MVP - Outlook]: "Re: getitemfromid and outlook reminders"
- Previous message: Ken Slovak - [MVP - Outlook]: "Re: How to read a unicode registry value?"
- In reply to: NilovSerge: "Item_Open and NewInspector events not triggered?"
- Messages sorted by: [ date ] [ thread ]