Use Access To Create Email To Multiple Recipients

Dec 18, 2007

Hi,

I'm not sure which Form topic this post should go under ...

I have an Access Database which contains contact information including email addresses in a number of tables. Each table is a reference group of individuals interested in a particular topic and has three fields (contactID, name and Email). All tables relate back to a master address list.

This allows me to have different (or multiple) people from within the same master address as contact persons for different reference groups. When I am doing labels, or printed reports for labelling I simply combine the address from the master list with the conact from the reference group list.

I would like to be able to replicate this approach for e-mail messages.

Ideally the databse would create distribution lists and export these to outlook global address list where they would be available to all users.

Alternately, I would write a module that automatically generates a new email message with all the Email Address entries from a user selected table in the To: field. The user would then edit the email message and press send.

It seems to me that eitehr way I will need to somehow concatenate all emails addresses in a table into a list separated by semi-colons.

View Replies


ADVERTISEMENT

Modules & VBA :: Add Multiple Recipients To Email Code?

Sep 18, 2013

How do I add multiple recipients to the '.To' line in the code below?

Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.BodyFormat = olFormatRichText
If Me.txtDepartment = "IT" Then
.To = "my email"
End If
.Subject = "hi"
.HTMLBody = "hi"
.send
End With

View 3 Replies View Related

Modules & VBA :: Send Single Email To Multiple Recipients?

Jul 31, 2013

What is the best way to send a single email to multiple recipients?

View 14 Replies View Related

Reports :: Sending Multiple Email - Unknown Message Recipients

Oct 15, 2013

I have this code below its giving me the RUntime 2295 error. Unknown message recipients. I have check all email addresses and they are fine. Everything else works except when it gets to Outlook and do not send email. I did a Debug Print but didnt understand how to do it.

Private Sub Command9_Click()
Dim rst As DAO.Recordset
Dim strEmailAddress
Set rst = CurrentDb.OpenRecordset("T_Inspectors")
Do Until rst.EOF

[Code] ....

View 2 Replies View Related

Modules & VBA :: Using Array To Specify Email Recipients (Access 2007 - Lotus Notes)

Aug 7, 2013

I've got a form which emails out a report when a new record is added to my database but I'm stuck when it comes to making it send it to more than one recipient.

I came across this on the web... which suggests I should be using an array but I don't know anything about arrays.

For multiple email addresses you just set MailDoc.sendto to an array of variants each of which will receive the message. So

Code:

Dim recip(25) as variant
recip(0) = "emailaddress1"
recip(1) = "emailaddress2" e.t.c

maildoc.sendto = recip

My problem is I'm not sure how to implement it? My 'recipients' are being pulled from a query... how do I get that into the array of variants?

View 11 Replies View Related

Sending Group Email To Selected Recipients

Aug 3, 2005

OK

I have read through I think every post with the word email in the title ! and in the subject... and tried various bits of code that were posted, but can't get anything to work... :mad:

Here is what I want to do.

I have a form (based on a qry called "QryInvoices Due") which brings up a list of people.

On this form is a field called "send email?" which is a tick box which the user can select.

I also have a command button ! which When Clicked I want it to do the following.

Send an email to all of the recipients which have "send email?" as YES

their email addr is in a field called "Contact email"

I don't want the email as an attachment, I don't need the message or even the subject included (although wld be nice as will be fairly static i think :) )

All I want is it to bring me up the Outlook New Message with all the recipients in it, I can add the subject and message then if necessary. Oh and there's more !! ;) I need the recipients to be in the bcc field as I don't want them all to see each other, the to: field can be blank or the first recipient whatever.

Anybody got any code that I can just copy and paste !! and that will miracleously work (sp?) ... Hope u can follow what I;m looking for..

Many thanks in advance

D

View 1 Replies View Related

Modules & VBA :: Create A Recordset For Multiple Emails And Send One Email

Mar 17, 2014

I have some code that takes from a query, an email address and sends out an email.Due the security warning that happens for each individual email, i want to create ONE email for all email address in the query and populate them to the BCC section of the sendobject.Here is the code that I currently use

Code:
Private Sub cmdSendEmail_Click()
Dim MyDB As DAO.Database
Dim rsEmail As DAO.Recordset
Dim sToName As String
Dim sSubject As String
Dim sMessageBody As String

[code]...

I want to populate the BCC field with multiple emails addresses seperated by ":" and send just one email.

View 4 Replies View Related

Reports :: Emailing Specialized Report To Multiple Recipients

Jul 20, 2015

I have a large report that generates information specific to a large list of contacts. I would like to email each contact a .pdf of their part of the report. If possible, I'd like access to run a loop and do this in one button click. I'm not even sure to begin with this.

View 2 Replies View Related

Using Create Email Button - Access Fails To Open Outlook

Dec 16, 2012

Occurs when I try using the Create Email button. I've enabled the access add in in Outlook. Same message comes up when Outlook is closed or open.

View 4 Replies View Related

Multiple Email Buttons One Access Form!!!

Aug 1, 2006

Hello to all the Users!
I am new at Access and new to programming.
I have created an Access form that has four labeled control buttons each one with an individuals name. I have the corresponding code:

Private Sub Email_PersonOne_Click()
DoCmd.SendObject acSendNoObject, , , "personone@yahoo.com", , , "Work Request", "A new work request has been submitted."
End Sub

When I have one button and one code the email function works. I want the users to be able to select one out of four people who they want to notify upon completion of the form. So I have four buttons and changed the email address and the names on the buttons but now none of the buttons work.
The code is on the same page separated with just a line between each section.

Does this make sense?
Any input would be greatly appreciated.
Thanks in advance for your time and help.
Sincerely,
DebraF

View 14 Replies View Related

Modules & VBA :: Selecting Recipients From A Table For Sending Emails? Access 2007

Jul 19, 2013

In an Access 2007 module, is there a way of sending an email to a list of people stored as a list in a table in the database, rather than having to put all the names into the function?

I have a function I'm using to generate and send out an email to certain people, but the list is constantly growing so I'm looking for a better way to manage it! The main issue is having to kick users out of the database every time I need to update the recipients list... because it's stored in the code.

If I create a simple table containing all the names, how could I then ask it to use that instead?

This is the function I'm using currently - found on here and adapted to my own purposes

Syntax to use for the function: SendNotesMail "recipients", "Body Message", "Additional Text", "Subject"

Code:
Public Function SendNotesMail(strSendTo As String, strBody As String, strExtraText As String, strSubject As String)
'This public sub will send a mail and attachment if neccessary to the recipient including the body text and additional comments from the Active record
DoCmd.OutputTo acOutputReport, "REP09emailnotification", acFormatRTF, "x: endersgroup tendering databaseTenderUpdate.rtf", False
Dim Subject As String
Dim Attachment As String

[Code] ....

So I guess my question is: how do I get my recipients from a table into the strsendto?

View 5 Replies View Related

How To Create Multiple Records In Access

Jan 5, 2012

I am relatively new to Access and have a simple database which I use to generate Publication numbers for our new publications. I would like to have a text box and button on a form that will generate duplicate records of the current record the same number of times as specified in the text box.

E.g. If I need 6 copies of a record I would like to enter 6 in a text box, click a command button that will generate 6 duplicates of that record.

The code in order to do this 'on click'.

Table = Publications
Form = Publicationsfrm
Text Box = Lines
Command Button = Submit
Primary Key = PublicationNo

I have tried the following code but it is not working.....

Dim i as Long, myRS as Recordset
Set myRS = CurrentDB.OpenRecordset("Publications")
For i = 1 to Me![Lines]
With myRS
.AddNew
![PublicationNo] = Me![PublicationNo]
.Update
End With
Next

Alternatively if I have a duplicate record button that uses a macro is there a way to run that macro the specified number of times in the 'Lines' text box.

View 14 Replies View Related

Modules & VBA :: Generate Multiple Email Messages To Different Email Addresses

Jul 16, 2014

I have made a query with the name "Confirmation" and it is setup like this:

Name trainee Email Training
John John@mail.com Tr one
Mary Mary@mail.com Tr two

I also made a button in a report with the title "Send Mail" now is my goal that if i press that button automatically multiple e-mail message's will be generated with data from people in that query. So if click on that "Send Email" button i want two different mails messages generated that will be send to John@mail.com and Mary@mail.com with in the mail body their data.

View 13 Replies View Related

Using Access To Create Document From Multiple Choice Options

Mar 23, 2013

I currently write (very long) reports for work, which have a lot of standard text in them - but the standard text varies according to the client's history.

I want to create a report-writing application for myself, composed of series of yes/no/maybe buttons
and depending on whether I click yes/no/maybe in each section, a different segment of text is inserted into the report.

Ideally the application would be able to insert, or create, formatted text - such as headings, bullet point lists etc - I would need to be able to export this report into Word

I started out by making a table, with each section being a different field, and the various paragraph options as different cells in the field, but I am stuck at present on the basic functionality of "click button , insert text"...

View 3 Replies View Related

Modules & VBA :: Using CDO To Create Email?

Feb 14, 2015

I have the code below which creates an email to Outlook.

I would like to use CDO to email but can not figure out how to incorporate CDO code into this

Private Sub Command68_Click()
On Error GoTo Handler
If DCount("[dob]", "[cpp12q]") = 0 Then
MsgBox "There are no records to send"

[code]....

View 5 Replies View Related

Modules & VBA :: Use Name To Create Email ID

Feb 17, 2015

I have some code that will connect to a database and the analyst name from the table. the name is stored as "Peter Cetera" and it would need to change it to "Cetera, Peter", this way I can paste it inside outlook email (happens via vba).

I use the below code to catch the name from the database:

Code:
Sub FindAnalystInDatabase()
'Declaring the necessary variables.
Dim con As Object
Dim rs As Object
Dim AccessFile As String

[Code] ....

The first value returned is the BIN nr and the second is what is interesting form me.

View 6 Replies View Related

General :: Create A New Outlook Email

Dec 12, 2013

I want to be able to click on a button on one of my forms and it create a new outlook email.I also want this email to have an attachment that is a report that I already have made.

View 1 Replies View Related

Create Command Button On Form To Send Email

Oct 26, 2004

I have created a form and housed in the form is a combo box that pulls info from managers I work with. I want to create a command button that I can click to send them an email. I have their information tabled and then have also converted that table into a form. I have their email address I just need to know how to properly code the command. I have no visual basic experience. I have had classes where I've coded in C++ and HTML but very limited.

Thanks

View 6 Replies View Related

General :: Create Email With PDF Attachment Using Lotus Notes

Jan 23, 2013

I need to create an email with an Access report attached as a PDF. I am using Access 2007 and Lotus Notes.If I use SendObject with acSendReport and acFormatPDF, it opens an email just fine but the attachment is created with some random letters and numbers and .tmp as the file name.

If I use Adobe Reader to open the attachment it displays correctly as a PDF, but I need the attachment name to be .pdf so it will automatically open with Adobe for the users.Is there a way to accomplish this with Lotus Notes? I have searched this forum and found some options for Outlook users, but not for Lotus Notes.

View 2 Replies View Related

How To Create A Report Imported From Word Document And Email It As PDF

Nov 12, 2014

I have a template letter in Word that I want to import into Access, so when I choose from a combo box an employee's ID, it automatically displays a report using the Word document template and filled with all related information of that employee (name, nationality, etc.) + it shows today's date. Then I can Save&Email to an Outlook contact.

View 2 Replies View Related

Modules & VBA :: Create PDF Of A Report And Send It Via Email - Invalid Use Of Null

Nov 4, 2013

I am using Access 2007 and are a newbie.

I am using the following code (Sendobject) to create a PDF of a report and send it via email to a customer's email address.

Private Sub EmailWorkOrderQuote_Click()
On Error GoTo Err_EmailWorkOrderQuote_Click
Dim stDocName As String
Dim mFilename As String
Dim mEmailAddress As String

[Code] ....

It works fine except that the I want to to able to utilize the ability to send the email with either both the CC and BCC or either or neither as well.

I have a table called "My Company Information" that contains the email addresses for the CC and BCC. If I have values in these fields, everything works great! If I have no values in either of these fields, I get "Invalid use of Null"....

I want to be able to use either both CC and BCC, either CC or BCC, or neither used and it still work.

View 9 Replies View Related

Modules & VBA :: ActiveX Component Can't Create Object - Sending Email

Jun 27, 2015

I am using the following code but when i run it produces the following error.

Run-time error '429':

ActiveX component can't create object.

then on debug it highlights the line

Set objOutlook = CreateObject("Outlook.Application")

I have searched online and already tried a suggestion to ensure that mictosoft outlook 14.0 object library is selected in the VBA references.

Code:

Dim objOutlook As Object
Dim objMailItem As Object
Const olMailItem As Integer = 0
Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(olMailItem)

[Code] ....

View 4 Replies View Related

Modules & VBA :: Create A Form Button That Will Automatically Email Each Row Of A Query Result

Jul 22, 2015

I am trying to create a form button that will automatically email each row of a query result to myself. At first the VBA code worked fine with a standard query. However when I use it with a query that contains a reference to a combobox form such as "<=[Forms]![Reminder]![Monthsleft].[Value] And >=0" I get the 3061 run-time error and "Too few parameters. Expected 1." I have included the VBA code below.

Private Sub Command9_Click()
Dim MyDb As DAO.Database
Dim rsEmail As DAO.Recordset
Dim sToName As String
Dim sSubject As String
Dim sMessageBody As String

[code]....

If you intend to renew the lease, terms and conditions will need to be submitted for ECC for approval (regardless of changes or not in lease rates). If the terms have yet to be confirmed, it is important to begin the negotiation process as soon as possible with a target to provide the ECC submission at least two months prior to the commencement date of the renewed lease. To ensure sufficient time for ECC approval before the contract expiry date, please prepare the ECC paper and obtain necessary endorsements. Submission details can be found here. The ECC submission template and PSD Questionnaire could be found from this link

DoCmd.SendObject acSendNoObject, , , _
sToName, , , sSubject, sMessageBody, False, False

.MoveNext
Loop
End With
Set MyDb = Nothing
Set rsEmail = Nothing
End Sub

View 2 Replies View Related

Modules & VBA :: How To Send Different Attachments To Different Recipients

Jul 22, 2015

I currently have a code set up which sends an attachment from a drive on my computer to all the email addresses in a certain query. I would like to change the code so that I can add a button that will allow me to send an email with a specific attachment depending on their individual code in a table, e.g each person will receive a specific attachment. At the moment, the attachments are saved with the same file name as the person's specific code.The code I am currently using is:

Private Sub Command9_Click()
Dim MyDb As DAO.Database
Dim rsEmail As DAO.Recordset
Dim qdf As DAO.QueryDef
Dim prm As DAO.Parameter
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object

[code].....

View 9 Replies View Related

Mail Merge: Best Way To Deal With Unknown Recipients?

May 13, 2007

I'm trying to create a database and it's going well accept for one facet. Some of my recipitents are not known by name. I am planning to use my database to issue letters, newsletters and the like but sometimes they will need to be addressed "Dear sir/madam" instead of "Dear Mr Smith" I was wondering to componsate for that in a database.

I've thought about using a "recipient" field, but I am not sure that would work too well as it would mean an extra field when it might not be needed (I can get "Dear Mr Smith" from fields such as Title and LastName).

I can't really get my head around it :(

One thing: Please don't think of me as some annoying mail-spam person. In truth I am a member of a charity but some of the businesses and charitable foundations we appeal to don't have named members for us to address letters to. Hence we need to use Dear Sir/Madam and the like.

:)

Please help me. I've hit my head on the wall so many times that I think I am going to demolish it!!

View 1 Replies View Related

Email Multiple Files

Jan 30, 2008

I think this was covered a while back and I did a search and couldn't find anything on it; Is there a way to attach and send multiple report .snp's to one email. I've been using SendObject.

thanks -

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved