Unknown Exception when processing a folder of forms

J

John Gordon

My organization has a custom Outlook form, designed in-house, for
submitting vacation and sick leave requests. Along with the request form,
a few other administrative forms were also developed, for reporting various
statistics about the requests.

At the time these forms were developed, our mail folders were stored
on a local server. Since then, our mail has been moved to reside on a
server in a different state. Connectivity to this remote server isn't
the best; several times throughout the day, we'll get the "Outlook is
trying to re-establish its connection" popup notice.

I'm not very familiar with VB programming; I inherited these programs
when the original developer retired.

Recently, one of the administrative forms started having trouble. This
form iterates through all of the leave requests in a given folder and
computes various totals. When the debugger kicks in, this is the line
that crashes:

For each itm in currentFolder.Items
Set IUP = itm.UserProperties ' this line crashes

The error is identified as an "unknown exception", while "stepping into
a remote procedure call".

Initially, I suspected that one of the leave requests had some bogus
values, causing a calculation to fail. But that's not the case. The
exception doesn't always happen on the same record. The crash usually
happens around item 245, give or take one or two. But not always; it
has happened much earlier on a few occasions.

I've tried this at widely varying times throughout the day, including
times when network traffic to the remote server was very light (we have
a dedicated link), so it doesn't seem like it's a simple traffic load
problem.

Anyone have an idea what might be happening? My gut feeling is that
it's something to do with the iffy connection to the server. Maybe
some sort of caching issue? I'm just stabbing in the dark, though.
Any suggestions will be most appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top