• Subject: Re: Help writing a macro to move emails
  • Author: landau@skiz.net
  • Date: 06 Feb 2008
  • References: 1 2 3 4
'Hope I'm not pushing here :). So I'm taking small steps. I tried to
write something to test to see if the current inspector was mail (as
you suggested). I believe if I can get this down, the rest will be
easy. I guess I'm not grok;ing the class thing. I took a C++ class a
while back and was good at it. In this case, I'm not sure if the class
gets instantiated with the "Set" command... and if so, what is its
"handle" ?

Class:EdInspectorEventClass
Public WithEvents myOlInspectors As Outlook.Inspectors
Public Sub Initialize_handler()
Set myOlInspectors = Application.Inspectors
End Sub
Private Sub myOlInspectors_NewInspector(ByVal Inspector As
Outlook.Inspector)
If (Inspector.CurrentItem.Class = olMail) Then
MsgBox ("You're in mail.")
End If
End Sub

In Module2:
Sub DoSomething()
Set EdInspectorEventClass = Outlook.Inspectors
EdInspectorEventClass.Initialize_handler ' *****This is where
it fails and says object does not support this property.*****
End Sub
06 Feb 2008Help writing a macro to move emails.landau@skiz.net
06 Feb 2008|- RE: Help writing a macro to move emails.Anand.V.V.N
22 Jan 2010|  \ imap move deleted email to TRASH in outlook.andre cloete
06 Feb 2008\ Re: Help writing a macro to move emails.Ken Slovak - [MVP - O...
06 Feb 2008   \ Re: Help writing a macro to move emails.landau@skiz.net
06 Feb 2008      \ Re: Help writing a macro to move emails.Ken Slovak - [MVP - O...
06 Feb 2008         \ Re: Help writing a macro to move emails.landau@skiz.net
07 Feb 2008            |- Re: Help writing a macro to move emails.landau@skiz.net
07 Feb 2008            \ Re: Help writing a macro to move emails.Ken Slovak - [MVP - O...
07 Feb 2008               \ Re: Help writing a macro to move emails.landau@skiz.net
07 Feb 2008                  \ Re: Help writing a macro to move emails.Ken Slovak - [MVP - O...
13 Mar 2008                     \ Re: Help writing a macro to move emails.sandeepthanki@gmail.com
Contact Us
All times are in (US) Eastern Daylight Time (GMT -4:00)