Emailing from Access

Cindy_B

Registered User.
Local time
Today, 18:59
Joined
Dec 9, 2002
Messages
12
We have a database where records are imported (via parsing from a text file) into a table and identified by customer. For example, we may receive information in for company X and then they are notified to send us some supporting documentation. This notification is completed manually by the user.
I would like to automate this by allowing the user to pull a query and (by using a checkbox or something similar) check off the customers that need notification then click a button or run a macro that automatically send out a generic email notifying customers that we need the documentation.
Problem is, I have never dealt with the SendObject (I think this is what I would use), much less pulling selected email addresses to do this. And customers will change from day to day depending on what information we have already received. We wouldn't want to contact a customer that has already sent in the documentation, that's why it's important for the use to "tell" Access which email addresses to use.
I know this could get confusing depending on my tables, etc. But was just hoping someone could point me in the right direction to begin.
Thanks,
Cindy
 
Sending Email

_______________________________
Problem is, I have never dealt with the SendObject (I think this is what I would use), much less pulling selected email addresses to do this.
_______________________________

This may help you with the sending email part. it contains 3 methods to loop thru and get records based on user selected criteria, then using either eudora or outlook express (maybe others i don't know) it puts in the address and sends the email out.
 

Attachments

Here is a database which uses the SendObject to email to the the current contact on the form 'Telephone_calls' - the code used on the [send email] button is as follows:

Private Sub btnSendEmail_Click()
Dim Linefeed, Content
Linefeed = Chr$(10) & Chr$(13)

Content = "Date: " & Me.Date & " " & Me.Time & " " & Linefeed & _
"Name: " & Me.ContactName & Linefeed & _
"Company: " & Me.Company & Linefeed & _
"Phone No: " & Me.Telephone & Linefeed & _
"Nature of Enquiry: " & Me.Nature_of_enquiry & Linefeed & _
"Message: " & Me.Message & Linefeed & _
"Taken by: " & Me.Taken_by & Linefeed & _
"Priority: " & Me.ID & Linefeed & _
"Action: " & Me.Action

DoCmd.SendObject acSendNoObject, , , Me.email, , , "Call waiting from " & Me.Company, Content
End Sub

You might be able to use some of this in solving your problem.

Best of luck

Valerie
 

Attachments

One more question...

Thanks Mile!!!!!!!

This is already up and working great here!
One more question: Is there any way to change the "return" email address of the emails?
For example, the user may choose and send the emails, however the office would like the reply address to be a certain group email so that everyone gets it.
I am using the dbEmail example you sent with the one form that the user can choose the name.
Thanks so much for your help!

Cindy:)
 
Change me.email to whatever group email address you desire.
 
Well, I'm using code in the VB editor in Access and it doesn't use "Me.email."
This is what I am using that Mile sent me:

Option Compare Database
Option Explicit

Private Sub cmdEmailSelected_Click()

Dim var As Variant
Dim strEmail As String

For Each var In Me.lstPeople.ItemsSelected
strEmail = Me.lstPeople.Column(2)
Next
DoCmd.SendObject acSendNoObject, , acFormatTXT, strEmail, , , "ACH Federal Funds", "We have received funds for your agency. Please forward the WVFIMS document ID to this office ASAP.", False

End Sub

Private Sub lstPeople_AfterUpdate()
Me.cmdEmailSelected.Enabled = _
IIf(Me.lstPeople.ItemsSelected.Count > 0, True, False)
End Sub

Thanks,
Cindy
 
Re: One more question...

Cindy_B said:
One more question: Is there any way to change the "return" email address of the emails?

Not with the SendObject keyword. :(

I suspect the Outlook Object Model would allow for this (as thePrez says) but I don't know enough about that model yet; just never had the time to study it.

At least you have something working momentarily until you can try the Outlook Object Model method.
 
newbie

I do not have any experience in VB and i am new to Access, i use filemaker.

is there another way to send emails other than all this vb?

I would like to have a button that will find all of the records that were created today then email the customer a email that inputs certian field info

example:

Valued Customer,

Thank you for purchasing "title". The cost for this book was "price". It is shipping to
"customername"
"customeradd"
"customercity" "customerstate" "customerzip"

etc...

all items in quotes are fields. any ideas?

if its too much do you have any suggestions on books or websites that could teach me VB and/or Access?

thanks
 

Users who are viewing this thread

Back
Top Bottom