Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   why does the Rule get Un-Checked in Outlook 2003? (http://www.outlookbanter.com/outlook-vba/58583-why-does-rule-get-un.html)

Zoe[_2_] October 9th 07 05:36 PM

why does the Rule get Un-Checked in Outlook 2003?
 
so, there is a small Sub CustomMailMessageRule(Item as MailItem)

every morning, I have to go and check the rule (named Test) as it's listed
on top of all other rules and always unchecked

what process goes and unchecks it ?

the machine is automatically closing OL2003 every night at 04:00 and
restarts itself and restarts OL2003

when I come into the office, the rule is unchecked




Ken Slovak - [MVP - Outlook] October 9th 07 05:48 PM

why does the Rule get Un-Checked in Outlook 2003?
 
Usually if a rule ends up unchecked it's because there was an error in your
Sub.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Zoe" wrote in message ...
so, there is a small Sub CustomMailMessageRule(Item as MailItem)

every morning, I have to go and check the rule (named Test) as it's listed
on top of all other rules and always unchecked

what process goes and unchecks it ?

the machine is automatically closing OL2003 every night at 04:00 and
restarts itself and restarts OL2003

when I come into the office, the rule is unchecked





Zoe[_2_] October 9th 07 06:31 PM

why does the Rule get Un-Checked in Outlook 2003?
 
Ken Slovak wrote:
Usually if a rule ends up unchecked it's because there was an error
in your Sub.


yet it continues to run just fine while I'm in the office

it's the small email logger (with header and sender) I wrote about a few
days ago.

could a temporary unavailability of the network server cause it to error and
uncheck itself? If yes, then would an On Error routine negate the effects of
the unchecking?



Ken Slovak - [MVP - Outlook] October 9th 07 07:04 PM

why does the Rule get Un-Checked in Outlook 2003?
 
That could do it. I don't know if an error handler would help, it certainly
should be used in any case as a good practice.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Zoe" wrote in message ...
Ken Slovak wrote:
Usually if a rule ends up unchecked it's because there was an error
in your Sub.


yet it continues to run just fine while I'm in the office

it's the small email logger (with header and sender) I wrote about a few
days ago.

could a temporary unavailability of the network server cause it to error
and uncheck itself? If yes, then would an On Error routine negate the
effects of the unchecking?




Zoe[_2_] October 9th 07 09:27 PM

why does the Rule get Un-Checked in Outlook 2003?
 
Ken Slovak wrote:
That could do it. I don't know if an error handler would help, it
certainly should be used in any case as a good practice.


Just now, one minute ago, while working on email, a message box popped up

"Rules in Error"

There is no information what is in error and the only option is Close

the test rule was thus unchecked in the Rules list and I had to go back and
manually check it again.

I have an On Error Goto Exit: in the start of the Sub and it's been happily
running all day long
Apparently that is not enough to keep the rule turned on and I wish I could
tell what was the error?



Ken Slovak - [MVP - Outlook] October 9th 07 09:46 PM

why does the Rule get Un-Checked in Outlook 2003?
 
Comment out your error handler and see where the code breaks when you do get
an error. An alternative that would also require manual monitoring would be
to set a breakpoint in your code and step the procedure to see where any
errors happen.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Zoe" wrote in message ...
Ken Slovak wrote:
That could do it. I don't know if an error handler would help, it
certainly should be used in any case as a good practice.


Just now, one minute ago, while working on email, a message box popped up

"Rules in Error"

There is no information what is in error and the only option is Close

the test rule was thus unchecked in the Rules list and I had to go back
and manually check it again.

I have an On Error Goto Exit: in the start of the Sub and it's been
happily running all day long
Apparently that is not enough to keep the rule turned on and I wish I
could tell what was the error?




Zoe[_2_] October 10th 07 06:13 PM

why does the Rule get Un-Checked in Outlook 2003?
 
Ken Slovak wrote:
Comment out your error handler and see where the code breaks when you
do get an error. An alternative that would also require manual
monitoring would be to set a breakpoint in your code and step the
procedure to see where any errors happen.


the error happens if in rapid succession multiple, subject only or subject
plus one line body emails arrive.

the Sub is not able to parse the received item fast enough and errors on the
2nd received email.

still don't know why and how to solve it.

surely OL2003 should be able to handle hundreds of back-to-back emails?

besides, what's the use of the On Error exit routine if it's not executed on
an error?


Ken Slovak - [MVP - Outlook] October 10th 07 08:12 PM

why does the Rule get Un-Checked in Outlook 2003?
 
The error handler is being executed, the problem is probably that your code
is taking too long and causing Outlook's input events to be missed. If a lot
of items come in at once there's a MAPI limitation anyway that would cause
the event to not even fire. That applies to the ItemAdd, ItemChange and
ItemRemove events on the Items collections of folders as well as to the
NewMail event. Even NewMailEx misses items sometimes.

I never use rules handlers like that anyway, there's too much out of your
control and too many cases where rules processing causes missed items or
interferes with other code that runs when items are added. I use ItemAdd
handlers for the Inbox and a timer based sweeper that sweeps the Inbox at
intervals to process any items that the ItemAdd handlers might have missed.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Zoe" wrote in message ...
Ken Slovak wrote:
Comment out your error handler and see where the code breaks when you
do get an error. An alternative that would also require manual
monitoring would be to set a breakpoint in your code and step the
procedure to see where any errors happen.


the error happens if in rapid succession multiple, subject only or subject
plus one line body emails arrive.

the Sub is not able to parse the received item fast enough and errors on
the 2nd received email.

still don't know why and how to solve it.

surely OL2003 should be able to handle hundreds of back-to-back emails?

besides, what's the use of the On Error exit routine if it's not executed
on an error?



Zoe[_2_] October 11th 07 07:04 PM

why does the Rule get Un-Checked in Outlook 2003?
 
Ken Slovak wrote:
use ItemAdd handlers for the Inbox and a timer based sweeper that
sweeps the Inbox at intervals to process any items that the ItemAdd
handlers might have missed.


care to share an example?

Ken Slovak - [MVP - Outlook] October 11th 07 07:45 PM

why does the Rule get Un-Checked in Outlook 2003?
 
An ItemAdd handler example? Look for ZapHTML at www.outlookcode.com for an
example that converts incoming HTML emails into plain text.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Zoe" wrote in message ...
Ken Slovak wrote:
use ItemAdd handlers for the Inbox and a timer based sweeper that
sweeps the Inbox at intervals to process any items that the ItemAdd
handlers might have missed.


care to share an example?




All times are GMT +1. The time now is 08:34 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com