Help Need to EMail Query

  • Thread starter Thread starter Richard Albrecht
  • Start date Start date
R

Richard Albrecht

Hi,

I need to automate a process that emails aproximatly 20 differant querys to
20 differant people. I want the query to go as an Excel spreadsheet. The
problem is:

I'm using DoCmd.SendObject.

Develpment Machine has Office 2000 with Outlook XP.
It works but the Message comes up saying "An application is trying to send
email, do you want to allow this?". This is a problem as it isn't automated
if someone has to press the button a hundred times. Any way to get rid of
that?

On Production Machine, straght Office / Outlook 2000 Access just shuts down.
This happens if the Edit Flag is true or False.

Is there some other way to automate this, perhaps a third party DLL???

TIA

Rich Albrecht
 
Richard Albrecht said:
Hi,

I need to automate a process that emails aproximatly 20 differant querys to
20 differant people. I want the query to go as an Excel spreadsheet. The
problem is:

I'm using DoCmd.SendObject.

Develpment Machine has Office 2000 with Outlook XP.
It works but the Message comes up saying "An application is trying to send
email, do you want to allow this?". This is a problem as it isn't automated
if someone has to press the button a hundred times. Any way to get rid of
that?

On Production Machine, straght Office / Outlook 2000 Access just shuts down.
This happens if the Edit Flag is true or False.

Is there some other way to automate this, perhaps a third party DLL???

TIA

Rich Albrecht

http://www.dimastr.com/redemption/
http://www.freevbcode.com/ShowCode.Asp?ID=109
 
Richard Albrecht said:
Brian,

Will vbSendMail.dll work with Access 2000?


TIA

Rich

Sure, I first used it with A97. The download includes the dll, so you don't
need VB6.
 
Brian,

Could you post a sample using the DLL in Access. I'm having a little trouble
getting my head around it.

Thanks!

Rich
 
Richard Albrecht said:
Brian,

Could you post a sample using the DLL in Access. I'm having a little trouble
getting my head around it.

Thanks!

Rich

There's an example on the web page! Don't forget to reference the DLL using
the References window.
 
Brian,

Forgive my ignorance, programming in Access 2000 is not my norm, I'm a
Delphi programer. Anyway I can't seem to figure out how to uses the
vbSendMail.dll in Access. First of all I can't get it to show up in the
Referances. I used Regserv to successfully register the dll, however
vbSendMail doesn't show up.

Any help at all would be appreciated, thanks!

Richard S Albrecht
 
Richard Albrecht said:
Brian,

Forgive my ignorance, programming in Access 2000 is not my norm, I'm a
Delphi programer. Anyway I can't seem to figure out how to uses the
vbSendMail.dll in Access. First of all I can't get it to show up in the
Referances. I used Regserv to successfully register the dll, however
vbSendMail doesn't show up.

Any help at all would be appreciated, thanks!

Richard S Albrecht

Forgiven! Anyway, I think that you'll find it straightforward to use once
you've got it referenced.

In order to reference it, you need to click the "Browse" button in the
References window, and browse to/open the vbSendMail.dll file. I find that
I have to do this twice before the referenced dll puts in an appearance
(presumably a bug in Access), but you may not find this. Once you have
referenced it, it appears in the References window not as vbSendMail but as
"SMTP Send Mail for VB6.0".

Good luck!
 
Brian,

Success in part. I can't seem to fiigure out how to trap for errors. I
have no idea if a particular email goes through or not.

TIA

Rich
 
Richard Albrecht said:
Brian,

Success in part. I can't seem to fiigure out how to trap for errors. I
have no idea if a particular email goes through or not.

TIA

Rich

Richard,

The software can't possibly know that. All it can do is offload a message
to your specified SMTP server, and then forget about it. This is no
different to using, say, Outlook: even if you send a message manually using
Outlook, all you know is that it got sent to your SMTP server, you don't
know whether it got to the recipient. You may *eventually* discover that it
didn't get delivered, but then again, you may not. That's email for you:
not reliable, not guaranteed, not secure.

However, I'm sure that vbSendMail will tell you if you if can't even
communicate with your SMTP server. I can't remember the details, but have
you checked the documentation that was in the download? It's a Word
document as I recall, and very comprehensive.

Incidentally, when I implement something like this, I test it by sending
mail to myself, but I'm sure you already figured that!
 
Back
Top