Automatic emails choke (1 Viewer)

B

Baffled

Guest
I have a few DBs that send automatic "reminder" email through Outlook - everything works fine except that when someone is no longer with the company and they are scheduled to receive a reminder - when the code runs and gets to that name it'll stop and a error message box will appear and the whole process stops. Therefore if I'm not here to catch it (and I'm not here a lot) many reminders do not get sent. I need to be able to skip that name if outlook does not recognize it (and maybe send a separate e-mail to me listing any names that were not recognized). All help is appreciated.

Baffled
 

Travis

Registered User.
Local time
Yesterday, 17:53
Joined
Dec 17, 1999
Messages
1,332
How is the Error Handler Setup.

You could catch this Error, Change the Receipent to You and Place the Who it was suppose to get sent to in the body of the email. However, I don't know how you are trapping errors in this routine currently. Can you post the code.
 

damdoumaa

Registered User.
Local time
Yesterday, 17:53
Joined
Apr 23, 2004
Messages
16
How do you send emails using email addresses saved in Access DB?

I have a contacts database on Access. I want users to be able to select multiple contacts from a listbox ( I know how to do this part), write the email subject and text then send an email using outlook? Is that doable?
Thank you
 
B

Baffled

Guest
This what I'm using to catch the error...

Function ApprovalReminder()
On Err GoTo ApprovalReminder_Err

'Reminder code here

ApprovalReminder_Exit:
Exit Function
ApprovalReminder_Err:
MsgBox Err.Description
Resume ApprovalReminder_Exit
End Function

It doesn't seem like its going thru the error handler - I get the runtime error box with the "End" and "Debug" buttons - not the Err.Description message box have above. Also, When the code chokes I get the error message "runtime error '-1698676731 (9a04005)'" and if I run it again and it chokes the run time error number will change to something different like '-1491058683 (a7204005)'. It changes every time. It almost seems like the error message is coming from Outlook and not Access. Is there some way I can make a loop to compare the name I want to the names in the outlook address book? I hope I'm making sense here.
 

jeff_i

Registered User.
Local time
Yesterday, 20:53
Joined
Jan 24, 2003
Messages
50
What I do to get around this problem is link to the company adress book, them compare the names, if the name doesn't exist I send the message to myself.
 
B

Baffled

Guest
I tried linking our Outlook global address book and also tried importing it as a table, the link/import worked fine - but some names do not show up in the table. I know I'm going to the right place on the network to get the data to import. I asked our IS guys about it and they just shrugged their shoulders. Am I doing something wrong? Does Access not like global address books? Is this an IS problem?

Baffled
 

B&R

Registered User.
Local time
Today, 01:53
Joined
Nov 17, 2003
Messages
19
Maybe a silly thought but why don't you create a distribution list in outlook for the script to use. This way you can easily update the distribution list when someone leaves or needs to be added. It is so simple that anyone could do it even when you are out of town. You would also probably get an undeliverable message in your outlook screen if an email address was no longer active. Hopefully this helps.

B&R
 
B

Baffled

Guest
I was able to link the Outlook global address book. Everything works fine now thanks for all the help.

Baffled
 

Users who are viewing this thread

Top Bottom