CDO via VBA in Access

C

Chris Kennedy

I have some code that sends an email with CDO. If the user isn't connected
to the Internet will the 'Connect to' dialog box appear prompting them to
connect. I can't test this on my machine at the moment. If it doesn't prompt
them is there a way to test for a connection with VBA? Also does anyone one
have any ideas to test for a successfully sent email. If I put a parameter
in wrong it just doesn't send rather than generate an error. Regards, Chris.
 
S

SA

Chris:

1.) You can check for an internet connection using the wininet dll. I don't
have the code handy but you can do a google search and you should be able to
find it.

2.) If not connected and you are relying on dial - up, I believe you'd have
to have Outlook set up to call the "Connect To" dialog if no connection
exists (Tools, Options).

3.) The only way to check if the mail was properly sent (as opposed to
hanging out in the outbox) is to grab the message ID (which you can do using
CDO) on creation and then loop through the sent items and/or outbox after a
specific interval. CDO doesn't support events so you'd have to use a timer
and poling of the various folders.

HTH
 

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