Z
zofficedepot
I have a rule "All New to Item Alert Window" that I'd like to toggle
from code. Is there something I can get to, like Rules("All New to
Item Alert Window")?
The below (I believe) would turn off the rule for the first 60 seconds
of Outlook, when I arrive in the morning. As things now stand, I have
to wait for the SLOWWW rule which takes about 1 second each for those
80 eagerly awaited Viagra and diet ads I awake to (stealing focus like
a Borg^H^H^H^H(I mean Microsoft developer), of course).
Bonus question Could I toggle a rule from a DOS command line?
Thank all of you generous people.
Option Explicit
Public Declare Function SetTimer Lib "user32" (ByVal hWnd As Long,
ByVal _
nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As
Long
Public Declare Function KillTimer Lib "user32" (ByVal hWnd As Long,
ByVal _
nIDEvent As Long) As Long
Sub TurnOnItemAlerts(ByVal hWnd As Long, ByVal uMsg As Long, _
ByVal nIDEvent As Long, ByVal dwTimer As Long)
KillTimer 1&, nIDEvent
'RIGHT HERE - what I need
End Sub
'ThisOutlookSession
Option Explicit
Sub Application_Startup()
SetTimer 0&, 1&, 60000&, AddressOf TurnOnItemAlerts 'timer 1 - 60
seconds
End Sub
from code. Is there something I can get to, like Rules("All New to
Item Alert Window")?
The below (I believe) would turn off the rule for the first 60 seconds
of Outlook, when I arrive in the morning. As things now stand, I have
to wait for the SLOWWW rule which takes about 1 second each for those
80 eagerly awaited Viagra and diet ads I awake to (stealing focus like
a Borg^H^H^H^H(I mean Microsoft developer), of course).
Bonus question Could I toggle a rule from a DOS command line?
Thank all of you generous people.
Option Explicit
Public Declare Function SetTimer Lib "user32" (ByVal hWnd As Long,
ByVal _
nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As
Long
Public Declare Function KillTimer Lib "user32" (ByVal hWnd As Long,
ByVal _
nIDEvent As Long) As Long
Sub TurnOnItemAlerts(ByVal hWnd As Long, ByVal uMsg As Long, _
ByVal nIDEvent As Long, ByVal dwTimer As Long)
KillTimer 1&, nIDEvent
'RIGHT HERE - what I need
End Sub
'ThisOutlookSession
Option Explicit
Sub Application_Startup()
SetTimer 0&, 1&, 60000&, AddressOf TurnOnItemAlerts 'timer 1 - 60
seconds
End Sub