![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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? |
#4
|
|||
|
|||
![]()
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? |
#5
|
|||
|
|||
![]()
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? |
#6
|
|||
|
|||
![]()
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? |
#7
|
|||
|
|||
![]()
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? |
#8
|
|||
|
|||
![]()
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? |
#9
|
|||
|
|||
![]()
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? |
#10
|
|||
|
|||
![]()
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? |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to setup a rule to forward rule in Outlook (xp or 2003) to forward emails from a certain domain when app isnt running? | KingCronos | Outlook - General Queries | 7 | November 15th 06 12:22 PM |
How do I stop Check Names in Outlook? I have checked off the box | Hal Kingsley | Outlook - Using Contacts | 17 | July 26th 06 10:59 AM |
when I start outlook in office 2003 my mail is not auto checked | les006 | Outlook - General Queries | 1 | July 7th 06 03:50 AM |
Outlook was not closed properly This file is being checked for pro | MS Admin | Outlook - Installation | 1 | July 1st 06 12:16 PM |
Mail being checked even though Outlook is closed and exited. | Paul M | Outlook - General Queries | 1 | January 27th 06 07:11 AM |