Using Access to send email

hinser13

Registered User.
Local time
Today, 00:38
Joined
Aug 8, 2010
Messages
75
Any one who has the time to help, I am trying in vain to find a way to send email to our clients, creating one email and sending to all in the database.

I have found the following link and I am probably (definatley!) being thick. http://support.microsoft.com/?id=318881

I have followed the instructions (Iam new to moduled VBA Code etc) and get very lost after I have created the module. I understanf that the module is just a list of commands and as far as I can see, its not obvious to me how I evoke the module to create the emails.

Do I add a cmd button to call the module? How do I evoke the moule? Im very stuck.

Thanks Mark
 
One way would be a button. The code behind the button would simply be one of the lines from step 11:

SendMessages

or to send with an attachment

SendMessages "C:\TestAttachment.txt"

If you're unsure how to put the code behind the button:

http://www.baldyweb.com/FirstVBA.htm
 
Thanks Paul
 
paul Do you mean like this

Option Compare Database
Private Sub Command8_Click()
SendMessages
End Sub

and should I save the module as "sendMessages"

Mark
 
The module can NOT have the same name as the function; Access will confuse them. Name it "basEmailFunctions" or something like that.
 
Mark

I'm working on the same issue. While I don't have the answer perhaps we could help each other. I'm close, just not there yet

email me: dave@ newhorizonsaviation.net (no space)
 
Mark,

Were you able to find a solution that worked for you. Seems we are seeking the same thing
 
I have incorporated a script that uses the SendObject function of Access which works. But each time it sends emails, there will be a security pop up box from Windows asking you if it is okay to send the email through outlook.

I haven't found any way to disable this popup message indefinitely.
 
Methods to avoid the warning include Outlook Redemption, a free utility called ClickYes, and using CDO to send the email instead of SendObject. I probably listed those in the reverse order of which I would use (ie start with CDO). There's info on CDO on the link I posted earlier.
 
I see the download for CDO 1.2.1 from Microsoft

However, do I need to install CDO on every computer that will be using this Access database? This could be a problem if I need to install CDO on every computer in the company..
 
I don't recall installing anything, but I'll dig up a good CDO site that Ruralguy posted.
 
I don't recall installing anything, but I'll dig up a good CDO site that Ruralguy posted.

Nvm the installation since I it's already in the References for Access 03

But i'm still getting a popup during the run saying "User-defined type is not defined" after I added both the Microsoft CDO 1.2.1 library and the Microsoft CDO Library for Windows 2000 Library...
 
Wow what's going on with the whole iCfg.Fields section??? Why is it linking a bunch of microsoft links that are broken?
 
Don't know...did you try it? That code works for me, substituting my info as appropriate (but leaving the links as is).
 
I use vbSendMail.dll to send emails.
it won't even require any mail application to be installed :)
 

Users who are viewing this thread

Back
Top Bottom