I had a rule that used a script. The code executed parsed text from
incoming emails (sales leads), and using DAO, wrote the parsed text to
an access 2003 database.
During individual testing the code worked fine.
Last night I did a rule test against about one month worth of leads
(approximately 1000 emails).
I got two rule errors towards the end of the Rule test telling me that
there was no script to run. I checked and my VBAProject_OTM was Blank!
Upon searching this group, I found that this sometimes happens when a
file is corrupted due to an error.
What could cause this to happen to a project that was working fine?
Is this why I see documentation suggesting a com add in instead of
using this method of automation.
I'm getting close to finishing an application for a customer and the
Rule running a Script when leads are received is a good part of the
project.
Am I correct in assuming that this method isn't reliable enough for a
commercial application? Or should I be looking for problems in my
code.
Fortunately, I had a backup and only lost a few hours of work.
Comments and suggestions please!!
Thanks to all,
Bob
> What could cause this to happen to a project that was working fine?
The exact cause is not known.
> Is this why I see documentation suggesting a com add in instead of
> using this method of automation.
It's one reason. The other is that VBA has no direct supported method for installing code to run on other machiens.
> Am I correct in assuming that this method isn't reliable enough for a
> commercial application?
Yes, that is correct. Outlook VBA is great for prototyping and OK for personal rules use, but not at all suitable for a commercial application.

Signature
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
>I had a rule that used a script. The code executed parsed text from
> incoming emails (sales leads), and using DAO, wrote the parsed text to
[quoted text clipped - 31 lines]
>
> Bob
Bob - 28 Dec 2006 15:13 GMT
Thank you for your quick response.
Do you have any suggestions for refrences on how to write and
distribute a com add in?
Thanks,
Bob
> > What could cause this to happen to a project that was working fine?
>
[quoted text clipped - 52 lines]
> >
> > Bob
Sue Mosher [MVP-Outlook] - 28 Dec 2006 15:21 GMT
See the samples and other resources at http://www.outlookcode.com/d/comaddins.htm and http://www.outlookcode.com/vsto/

Signature
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
>
> Do you have any suggestions for refrences on how to write and
> distribute a com add in?
Bob - 28 Dec 2006 15:43 GMT
Thanks again for your help. I'm looking at Visual Basic 6.0 now.
What's not clear is how do I use the Add in. Do I still need to use a
rule to trigger the Com Add In to run?
Thanks,
Bob
> See the samples and other resources at http://www.outlookcode.com/d/comaddins.htm and http://www.outlookcode.com/vsto/
>
[quoted text clipped - 8 lines]
> > Do you have any suggestions for refrences on how to write and
> > distribute a com add in?
Sue Mosher [MVP-Outlook] - 28 Dec 2006 15:52 GMT
No, you need to use Outlook events, not rules. If your goal is to process incoming messages and Outlook 2003 is the target version, I'd recommend using the Application.NewMailEx event; see http://www.outlookcode.com/codedetail.aspx?id=1410 for a code sample.

Signature
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> Thanks again for your help. I'm looking at Visual Basic 6.0 now.
>
[quoted text clipped - 8 lines]
>> > Do you have any suggestions for refrences on how to write and
>> > distribute a com add in?
Bob - 28 Dec 2006 16:15 GMT
Thank you once again.
I'll be quiet for awhile and do some research.
Bob
> No, you need to use Outlook events, not rules. If your goal is to process incoming messages and Outlook 2003 is the target version, I'd recommend using the Application.NewMailEx event; see http://www.outlookcode.com/codedetail.aspx?id=1410 for a code sample.
>
[quoted text clipped - 18 lines]
> >> > Do you have any suggestions for refrences on how to write and
> >> > distribute a com add in?