R
RSteph
I have an access database that generates a report, then sends the report out
as an attachment via e-mail (through Outlook) to a list of users. The problem
I'm having is that when I start sending the e-mails it ends up locking up my
computer, and then crashing Outlook; so I'll get through part of the list,
then I'll have to close the program, then go back in, and step through the
code to get back to the last person that an e-mail was sent to, and start up
again on the next person.
What I would like to do is first, add a some "Do Events" type of code, so
that the computer doesn't lock up while it's running through the loop sending
all the e-mails. Next, I'd like to put it some kind of timer, or delay, so
that after it sends an e-mail it'll wait (say maybe 4-5 seconds) before
continuing the loop and starting the next one. I'm hoping that adding these
two items will help prevent my computer from locking up, and prevent Outlook
from crashing.
That being said, it has been a long time since I have done much coding in
Access (or any of the office products for that matter). Can anyone help me
with the best way to do this, or perhaps point me to a web resource that
would help me get something like this put together (get the timer and do
events items added in to the code I've already put together)?
Any help would be greatly appreciated.
Thank you.
as an attachment via e-mail (through Outlook) to a list of users. The problem
I'm having is that when I start sending the e-mails it ends up locking up my
computer, and then crashing Outlook; so I'll get through part of the list,
then I'll have to close the program, then go back in, and step through the
code to get back to the last person that an e-mail was sent to, and start up
again on the next person.
What I would like to do is first, add a some "Do Events" type of code, so
that the computer doesn't lock up while it's running through the loop sending
all the e-mails. Next, I'd like to put it some kind of timer, or delay, so
that after it sends an e-mail it'll wait (say maybe 4-5 seconds) before
continuing the loop and starting the next one. I'm hoping that adding these
two items will help prevent my computer from locking up, and prevent Outlook
from crashing.
That being said, it has been a long time since I have done much coding in
Access (or any of the office products for that matter). Can anyone help me
with the best way to do this, or perhaps point me to a web resource that
would help me get something like this put together (get the timer and do
events items added in to the code I've already put together)?
Any help would be greatly appreciated.
Thank you.