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 Replies


ADVERTISEMENT

General :: Send Outlook Email Based On List Of Emails In Access Query?

Sep 15, 2014

I've setup a selection form that returns a specific list of email addresses in a query.

What I can't work out is how to press a button and have the email addresses populate the To: field in a blank Outlook email - I don't need any bells or whistles.

View 8 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

General :: Send A Specific Email From Outlook To All Email Addresses Within A Query

Jan 21, 2014

I have a database that I can use to create a query, grouping companies by city. I then want to send a specific email I have created in outlook to all of the email addresses in the query.I do not need to include names.

View 6 Replies View Related

Forms :: Access Send Email Using Outlook

Mar 13, 2013

I am trying to modify the following code to send an automated e-mail using Microsoft Outlook instead of Lotus Notes. We recently switched e-mail clients and now the older code does not work. I have tried to comment in all areas to indicate where the new Outlook code has been inserted.

Private Sub SendEmail(ByVal Subject As String, ByVal Body As String)
'The bulk of this code for Lotus Notes comes from this website:
Dim copy(100) As Variant
Dim strSQL As String
Dim rsTemp As Recordset
Dim Maildb As Object 'The mail database
Dim UserName As String 'The current users notes name

[code]....

View 10 Replies View Related

Send Automatic Email Upon Receiving A Request In Access Through Outlook

Nov 11, 2014

I'm trying to use Access to send an automatic email reply upon receiving a request from a customer/employee, telling them that their request has been received and this is the tracking number and the due date of service completion. How can I do that? And I want it using Outlook because all the contacts are saved in Outlook and all emails sent and received through Outlook. And the version is Access 2010.

View 3 Replies View Related

Modules & VBA :: Cannot Set Outlook Send Using Account

Jul 13, 2013

A client wants to e-mail newsletters using a non-default Outlook account. The code below does everything the client needs except setting the SendUsingAccount. In debug I can see that the correct account is assigned, yet all of my testing results in e-mails where the From line is the default account. The test setup uses my own isolated SMTP server, so when I look at the e-mails sent the sender is the default account. The default account's Sent folder shows the sent mail, which is not what we want.

Code:
Sub prepEmail()
Dim frm As Form, startDate As Date, endDate As Date
Dim rs As DAO.Recordset, strSQL As String, intNewsLetter As Integer
Dim rsEmail As DAO.Recordset, rsNewsletters As DAO.Recordset
Dim OlApp As Object, ol As Object
Dim olMail As Object, olAcct, olAcctTemp

[code]...

View 3 Replies View Related

Using VBA To Send HTML Email - Unordered List Indent

Jan 7, 2015

How to remove the indent on a <ul> item.

The following link is where I am sourcing how to do it, however no matter what I do within my VB, the email comes up with about a full inch worth of an indent on the UL.

[URL] ....

Code:
"<style>ul { display: block; list-style-type: disc; margin-top: 1em; margin-bottom: 1 em; margin-left: 0; margin-right: 0; padding-left: 0; }</style>"

And then further down in the body where the UL is called

Code:
"<p><ul><li>Print this email and return it with your shipment.</li><b>OR</b><br><li>Include your Dealer Number, Serial Number and Claim Number with your shipment.</li></ul></p>"

No matter what I change, the indentation doesn't move. See below...

View 14 Replies View Related

Modules & VBA :: How To Send A Report Via Outlook 2010

Oct 30, 2014

I have a VBA module in my Access 2010 database that will send a report as a PDF via email to a predetermined email address. the only problem using the docmd.sendobject method is i keep getting a pop up that says "A program is trying to send an e-mail on your behalf. If this is unexpected, click Deny and verify your antivirus software is up-to-date."

I have a windows task set up at the same time each day to open this database which runs an autoexec that creates this report and using my VBA module sends the email. i want it to just send the email without any imput from me. I want automation.

Here is my code that i am using to create and send the email

"Private Sub Report_Activate()
filename = "Name of file" & Format(Me.Date_time_returned "MMDDYY") & ".pdf"
DoCmd.SetWarnings False
DoCmd.SendObject acSendReport, "Name of file", acFormatPDF, "the destination email address goes here",,, "Request completed and sent " & Format(Me.Date_time_returned, "MMDDYY"), "Subject of email goes here", False
DoCmd.SetWarnings True
End Sub"

View 4 Replies View Related

Forms :: Multi List To Select Reports Send By Email

Mar 13, 2015

I am trying to create a Multi list to select reports to send by email. I am able to select one report to send but when I change the list box to multi select it doesn't work.

The codes I have been using are;

Private Sub Command2_Click()
On Error GoTo ErrorHandler
Dim sAddr As String, sSubj As String, sFor As String
If IsNull(ReportList) Then Exit Sub

[Code] ....

View 4 Replies View Related

Modules & VBA :: Send Pdf With Outlook Without Saving Actual File

Oct 13, 2014

I want to send an e-mail with a report as attachment.On the internet i have found two options, and both are not the best solutions.

1. option

Code:
DoCmd.SendObject acSendReport, sReport, acFormatPDF, sMailAdres

With this construction I don't have enough control over the mail, and worse, I get an Outlook message when the mail is sending which I have to answer.

2. option

Code:
Dim oMail As MailItem
Dim oAtt As Attachment

Set oApp = CreateObject("Outlook.application")
Set oMail = oApp.CreateItem(olMailItem)
DoCmd.OpenReport ReportName:=sReport, View:=acViewPreview, WindowMode:=acHidden
Set rpt = Reports(sReport)

[code]...

with this construction I have to enter an existing report.pdf on my filesystem (bold line), but I want to pass the rpt object straight to the mail as an attachment.

View 2 Replies View Related

Modules & VBA :: Filling Excel Template Cells / Save Then Send On Outlook

Jul 13, 2013

I have the code below which takes information from a form on access and sends it over to the correct place on an excel spreadsheet template. This works fine but I then need it to save and send on outlook.

The issue I am having is that the saved document is not attaching to the e-mail. The subject etc all work fine but the excel spreadsheet just doesn't attach. When I go into the folder I have specified for the document to be saved in it isn't there either. :0(

The code for the e-mail "callmail" function works perfectly for word documents but I don't know if it is different for an excel file.

Code:

Private Sub Command154_Click()
On Error Resume Next
Dim appExcel As Excel.Application
Dim wbook As Excel.Workbook
Dim wsheet As Excel.Worksheet
Set appExcel = New Excel.Application

[Code] .....

View 4 Replies View Related

Modules & VBA :: Send Meeting To Outlook - Address Item Line Causing Error

Mar 24, 2014

I'm trying to have a command button send info on the form straight to Outlook as a meeting. So far, the code below works apart from the address bit. I need the code to automatically add the same 2 email addresses as recepients everytime.

Error message highlights the red line below with the following message:

Runtime error '438'
Object doesn't support this property or method

I'm new to VBA, so don't understand what is wrong here. The reference is set, I've tried different permutations of the "To:" & "Recipients.Add" for the email address with no joy.

Code:
Private Sub cmdSend_Click()
Dim outApp As Object
Set outApp = CreateObject("Outlook.application")
Set outmail = outApp.CreateItem(olappointmentitem)

[Code] .....

View 10 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 :: Email Subform Through Outlook

Jul 30, 2014

I'm trying to make it so when a subform is updated, it will email the contents of that subform to me. I've got it all working, except for the content of the email part.

Code:
Sub SendRepReassignment()
Dim oOutlook As Outlook.Application
Dim oEmailItem As MailItem
Dim objOutlookAttach As Outlook.Attachment
On Error Resume Next
Err.Clear

[code]...

View 3 Replies View Related

Modules & VBA :: Email In Outlook With Attachments

Jun 16, 2013

I am making a new database. And I want to confirm that I can do all the following in Access 2007 and how is best to do it.

1) A form where I can define:a unique Email Number starting at 1.
a directory eg "C:UsersPaulDesktop101 - Brick House"
an email address.
a Recipient Name
a Category for the email. Choosing either "Working" or "Complete". This would be part of the email subject.

2) a button which onclick lists all the files in the defined directory to a box on the form.

3) a button which onclick exports a report containing the list of files to PDF. Then attaches a zip of these files and the PDF report to an email in Outlook for revision before sending.

4)In Outlook the subject would be:

"The Directory Name" - "The Category" - "The Email Number"
"101 - Brick House - Working - Email 1"

5)In Outlook the body would simply be the subject of the email followed by the filenames of the 2 attached files, ie the PDF report and the zip.

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

Modules & VBA :: Sending Email Through Outlook By A Certain Date

Nov 26, 2013

I am a College Instructor and I would like to make a Database that will regularly email me a list of Students who are approaching the mid-point of their Program.Is it possible to program Access to email a list with Student Names, Registration Numbers, etc, etc. by a given date?

As of right now I have a Database with all of the students' pertinent information but I have to manually comb through the Database each week to see which students will require a Mid-Term interview that week.

View 7 Replies View Related

Modules & VBA :: Merge To Outlook Email Using Bookmarks

Aug 15, 2015

I have been trying to get this to work but without success.

My original source was [URL] ....

The code looks good apart from the fact that the Inspector was not Dimensioned. Anyway, here is my code which fails as the error message is that objSel is not set.

Code:
Dim MyOutlook As Outlook.Application
Dim MyMail As Outlook.MailItem
Set MyOutlook = New Outlook.Application
Set MyMail = MyOutlook.CreateItemFromTemplate(DLookup("TemplateFolder", "Company Details") & "eMail Template bm4.oft")

MyMail.To = strTarget
MyMail.Subject = "Test"

[Code] .....

View 1 Replies View Related

Modules & VBA :: Sending Email Without Outlook Being Installed

Aug 16, 2014

I have this VBA code:

Option Compare Database
Option Explicit
Private Const URL_CDOCONFIG As String = ""
Public Function SendEmail(ByVal sTo As String, ByVal sFrom As String, _
Optional ByVal sCC As String = "", Optional ByVal sBCC As String = "", _
Optional ByVal sSubject As String = "", Optional ByVal sBody As String = "", _

[Code] ....

It is being called with the following macro:

SendEmail("gregory.west@dbwsys.mb.ca","vba@dbwsys. mb.ca","","","Subject line","Body of eMail here")

But I get this error message.

The "SendUsing" configuration value is invalid.

View 1 Replies View Related

Modules & VBA :: Search Outlook For Email Addresses

Nov 25, 2013

How I could initiate a search from MS Access on an Outlook folder for an email addresss.

I would like to to work just as if you were using the outlook 'Try searching in All Mail Items'

View 11 Replies View Related







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