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 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 :: 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

General :: How To Send A Single Email Message To All The Email Addresses In Query

Jun 2, 2014

I have a query (Access 2007) that contains a field named "email" (which contains email addresses, of course). I want to email everyone in the query and they are all going to receive the same message. My email to them doesn't have to be personalized and I don't need to collect data from the recipients. I don't even need a reply to the email I send.

View 12 Replies View Related

Modules & VBA :: Send Emails To Defined Array Of Recipients Using CDO

Sep 18, 2013

I am trying to send emails using CDO to an array of recipients loaded from a query. I have made this work using Lotus Notes so i know the first part of my code is correct, and the current code I have works when I input an actual email address. But when I try to add the Array name into the 'To' field I get a data mismatch error.

View 3 Replies View Related

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 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 :: 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

Modules & VBA :: Send Individual Pdf Attachment To Individual Recipients

Feb 3, 2014

I have created a database that generates a report with customer debts. I have a lot of customers and in a report each page is a different customer with individual debts info. What i would like to do is to create a button and distribute individual report page as pdf to individual customer by email. I'm using Lotus notes. I have searched the forums i found something but it was not what i was looking for.

View 1 Replies View Related

Modules & VBA :: Sending A Single Email To A Single Record In A Query

May 15, 2014

I am trying to create a form with a button attached to each record that would allow the user to click the button and it would automatically open outlook and fill in the TO:, SUBJECT: and BODY: fields. Here is the code that I currently have:

Code:
Private Sub Command33_Click()
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object
Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.CreateItem(0)

[code]...

There are two issues I keep running into:

1. This code opens outlook and populates all of the fields but pastes the email incorrectly. Instead of pasting just the email (email@email.com) it pastes the html tags as well (email@email.com#mailto:email@email.com#) which means that the user would have to delete everything between the #'s in order to send the email every time.

2. I currently have the email BODY pulling from a table but this obviously limits what I can do. I would like to simply encode the BODY within the VBA code. The setup I am looking for is:
one paragraph
a blank line
a hyperlink to a website
a blank line
another paragraph

View 9 Replies View Related

Send Multiple Attachments In One Email

Sep 9, 2015

Below code is working good, but want to add one more code like

DoCmd.SendObject acSendTable, "SM_Main_Output", acFormatXLS, rs("Email Address"), rs("CC"), "", "SM Sales & Availability Report for " & rs("SM"), "Dear Sales Manager, Please find attached Sales and Availability Report. If you have any query regarding your Structure/Area Please contact your Sales coordination department", 0, False

I want to send backup data as well.

Private Sub Command9_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim eml As String

[Code] ....

View 2 Replies View Related

Forms :: Embedded Within A Loop To Send Various Filters Of Report To Different Recipients

Aug 15, 2013

In a form I have a button which creates (in preview) an outlook message with a pdf report. It opens and displays just as I want it to, but if I chose to save that message in outlook and either send or cancel (i.e. allowing user to save to drafts and send later) then MS Access crashes.To ensure this wasn't to do with any compile / corruption within my full application I mirrored the process in a very simple 1 table / 1 form / 1 report db and still the same - access crashes after saving the outlook message and either sending the message or cancelling out the message.

Form code is as follows;Private Sub Command0_Click()
On Error Resume Next
DoCmd.SendObject acSendReport, "Table1", acFormatPDF, "someemaddress", , , , "REQUEST FOR INFORMATION"
DoEvents
On Error GoTo 0
End Sub

In my main application this process is embedded within a loop to send various filters of the report to different recipients, which works fine if 'save' is not used within Outlook..

View 1 Replies View Related

Modules & VBA :: Send Email When DB First Opened

Feb 11, 2014

I have the code for sending an email but I only want to send a single email when there are records in a query and only when the database is first opened.

I hadn't considered this in my design so what structural requirements would it require if any?

View 5 Replies View Related

Modules & VBA :: Send Hyperlink In Email

Aug 1, 2013

I have an Access 2010 database which has a table with several fields with the Hyperlink data type. Some of these hyperlinks reference files stored in a SharePoint database. I am relatively new to using hyperlinks. The task is to insert those hyperlinks into an email using VBA so that the recipient can just click on them to view the documents.

I have no problems with using VBA to create emails or to add attachments. My issue is with adding hyperlinks to the body of the email.

View 12 Replies View Related

Modules & VBA :: Send Email Via Certain Account?

Jul 2, 2015

I have a several templates in outlook 2003 for my charity work.

All is OK if I send the odd one now and again, but the workload is increasing with more and more at any one time. However having seen various posts on here, I was thinking I could set something similar in Access as well as keeping track of the payments & deposits more easily.

I am fine with to, cc,bcc, body, subject etc, but what I need to do is SendUsingAccount, but 2003 does not have this property, it started with 2007.

As well as sending on that particular account I also need the signature linked to that account.

I could add that signature by code if I can get the correct account and for some reason the signature is not added.

I tried using SendOnBehalfOfName which works as far as the correct email address is used, but still uses my default a/c.

As an aside, my Outlook session would always be open, so I will use GetObject and not CreateObject method, but would like not to have the warning dialogue in Outlook pop up all the time.

View 14 Replies View Related

Modules & VBA :: Send Two Reports In Email Body?

Jan 15, 2015

With the code below , I send the report: “ESERT4H”, in email body. How I could add yet another report on the same body of the email ?

DoCmd.OutputTo acOutputReport, "ESERT4H", "HTML(*.html)", "D:Access empESERT4H.html", False, "", 0, acExportQualityScreen
Dim Out As Outlook.Application
Dim NS As Outlook.NameSpace
Dim Folder As MAPIFolder
Dim Mens As MailItem

[Code] ....

View 7 Replies View Related

Modules & VBA :: How To Send Email Automatically When Condition Met

Aug 13, 2014

I have inventory database, in database there is "NextScheduledMaintenance" field.

I want access to send email automatically when scheduled maintenance date due.

View 7 Replies View Related

Modules & VBA :: Open Outlook And Send Email

Feb 3, 2014

I'd like a command button to open Outlook and create a new email message with the To and Subject fields already populated with what I want, is there anyway to do this?

View 1 Replies View Related

Modules & VBA :: Send Email From Database With Category

Aug 17, 2015

Is it possible to send an email from an access 2007 database with a category?

View 8 Replies View Related

Modules & VBA :: Automatically Loop And Send Email

Oct 18, 2013

I am setting up a database to track preventative maintenance required for testing equipment in our repair shop. Some of my associates would like to be able to send e-mail notifications via the database when maintenance is due. I set up a query to show the people who need to receive an e-mail and a query to show the maintenance each person needs to perform.

Each person will need to perform more than one maintenance step each time. I would like to get it so that the database will loop through the first query and generate one e-mail for each person. I would like the e-mail to list all the steps that person would need to do (as shown in the second query). I know this would require setting up loops and I'm afraid I'm not very good at writing loops.

I think this will need two loops. One to loop through the first query to see all the e-mails that will need generated and one to loop through the actions to be included in each e-mail. The person's name is included in both queries and can be used to set up a link between the two.

View 5 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 :: How To Send Embedded Word Document As Email

Dec 17, 2013

I'm using ACCESS 2010. I have a form which is having a embedded word document. What I'm trying to do is i want to enable user to format a mail in the embedded word document which will contain rich text and screenshots then with a click of button an outlook mail should open and content of this document should be pasted there. Once user sends this email, I want to save content of embedded document in the database.

View 4 Replies View Related

Modules & VBA :: Database Setup - Send Email From Alternate Account

May 30, 2014

I currently have two e-mail accounts on my computer. One is my default e-mail address with my name on it. The other e-mail account is a generic account with the department name.

I have a database set up to generate and send e-mails to our technicians notifying them when an order they placed gets put on back order. This database could possibly send twenty or thirty e-mails out each time it is run. My manager has requested that the database send the e-mails from the generic e-mail account instead of the default account. That way, when the field replies to the e-mail, they won't bombard my account.

Is there a way to tell the database which e-mail account to send an e-mail from?

I am currently using the below module to send the e-mails:

Option Explicit
Dim appOutlook As Outlook.Application
Dim namespaceOutlook As Outlook.NameSpace
Sub Outlook_SendMail(sEmailAddr As String, sEmailSubj As String, sEmailBody As String, Optional sAttach1 As String, Optional sAttach2 As String)

[Code] ....

View 2 Replies View Related

Modules & VBA :: Send Email To Outlook Distribution List - To / CC Or BCC Parameters

Jan 4, 2014

Is there a way of doing the above? I have several distribution lists (some >100 recipients) defined in Outlook, and would like to use the Docmd. Send Object command to send messages to one or several of them. I cannot find a way of defining a distribution list as any of the To, Cc or Bcc parameters.

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







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