Queries :: Send Query Result Via Email Attachment

Jul 25, 2013

I'd like to send a query result via email attachment daily without user intervention. Is it possible?

View Replies


ADVERTISEMENT

Send Email Attachment

Dec 8, 2006

I have the following code to send a email with outlook, what I need is to automatically collect a attachment named commissions located in C:document and settings/Documents/...
Private Sub cmdSendEmail_Click()
DoCmd.SendObject acSendNoObject, , , cboEmail.Value, , , "Commission Request", "A new commission request has been submitted."
End Sub

How can I do it??
Thanks

View 5 Replies View Related

Send Email Attachment Located In A Table From A Form?

Apr 9, 2014

I have Access 2007. I have a form where I can attach PDFs, Word documents, etc with an command button. This atachment is then put into a field in a table which has the email address and works fine.

The attachments are there in the field with the paper clip in the field title.I have a command button with an embedded macro that opens OUTLOOK and the email form with the email address and all the other information inserted perfectly. How do I get the OUTLOOK email to grab the assoiated attachment(s) from the record in the table and send them with the email? I can send the email without the attachment just fine.

The attachments cannot be located in a common path. They must be in the field in the associated record and each attachement will be different from one record to the next.

The emails are sent one by one, not as part of a group.

The form name is TASK DETAILS.

The email command buttin is called E-mail

The table is called TASKS

The attachment command buttin is called Attachments

What do I need to do this?

View 14 Replies View Related

Send Email Form Access Code With Attachment

Feb 14, 2012

Send an email form Access code with attachment..

I am able to export data to excel file, I would like to send the excel file created to the customer, is there a sample code I can use to do this in a module.

View 1 Replies View Related

General :: Send Email Attachment Using Form Data Using Automation

Jun 20, 2013

I am currently using SendObj method to send an Outlook email and selected report as an attachment using the current form's data. This is triggered by a button click.

This is working well apart from having to use 'ClickYes' to outwit the Outlook 2012 security system.

However I now need to selectively send an extra pdf file with some of the emails based on a Yes/No field on the form. This is a fixed file on my local C drive.

I think I have to use automation to do that but I can't find a method of specifying the report I currently use in the SendObj method in the .Add.Attachment line.

Do I need to run the report and then save it so that I can specify the path and name in the .Add.attachment line followed by code which will delete the file? or is there a means of combining the code I currently use in SendObj to create the pdf object with automation option?

I have working code for both attachments at present but they send separate emails and I would prefer to combine them if possible.

View 3 Replies View Related

General :: Using Access 2010 To Send Bulk Email Each With A Unique PDF Attachment?

Feb 12, 2013

I would like to automate the current process of sending an e-mail with a PDF attachment that is unique to each recipient; it is their test results. I'm sending an e-mail one at a time (which was fine when the number of folks being tested was small, but now I'm up to approximately 200 e-mails and growing each year)

System Environment:

Windows 7 SP1 (64 bit)
Office 2010 Professional

Access environment and Process:

1. A qry object/letter is built based on 4 tables (test results, result averages, a global employee list and location)

2. The Report has both static and dynamic text. Examples include: "Dear" [qry-Letter. F_name] and Address Information

a. =[qry-Letters.F_Name] & " " & [qry-Letters.L_Name]
b. =[qry-Letters.Position]
c. ="Dept " & Right([qry-Letters.Dept],3) & ", " & [qry-Letters.City]

3. The report also includes the employee's results, the session averages (testing is conducted at multiple locations each occurrence is a session) and companywide averages.

4. Report Process: Run the report, entering primary key Emp_ID, report is populated saved (overwritten with the next Emp_ID and printed as a saved PDF.

5. MS Outlook: create a new e-mail, text body is common to all e-mails e.g. "attached are your test results" the PDF is attached and the e-mail sent to the recipient (the e-mail address follows the corporate standard, =Trim([qry-Letters.F_Name] & "." & [qry-Letters.L_Name] & "@abc.com")

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

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

Send Query In Email Body

Feb 27, 2006

I almost have what I need, but I am not quite there. I am a VBA novice and need help. I couldnt understand some of the code I have searched for on this topic.

I have a query that returns exactly the results I want. By using a SendObject macro I can accomplish sending the message with a .txt file attached. What I want to do is instead of having the attachment I want to send my query "FaxReportQueryReport" in the body of the email. No set address, just a set RE: line of "Today's Deliveries".

View 10 Replies View Related

Send Email With Data From A Query

Nov 29, 2004

I have a database where I keep track of student employees. The database has three forms, a new hire form, a supervisor form and a financial aid form. The student fills out a new hire form that requires additional input from the hiring department and from financial aid. Included on the new hire form is the name of the supervisor. I have a table that contains the supervisor name as well as email address. Once the student has filled out the new hire form, I would like to generate an email that sends a report, identifying the new hire, to the supervisor requesting them to fill in the missing information in the database. I want the email to either (1) be generated automatically once the student has completed the form selecting who to email to form the student input or (2) have the student pick the supervisor from a list to send the email to. I have very limited knowledge of programming. Thanks.

View 3 Replies View Related

General :: Send Email Based On Query?

Apr 23, 2013

I have an access database that sends one e-mail to each individual in a table, that works fine. Now I would like to send an e-mail to the leaders of these individuals, however, some leaders have more than individual under their scope so to avoid sending several emails, I would like to know if there is any way I can send one e-mail to the person with the names of the individuals he leads in the body of the e-mail. This is the code I have that sends emails to the individuals:

Code:
Private Sub Command2_Click()
Dim MyDB As Database
Dim MyRS As Recordset

[Code]....

View 7 Replies View Related

Queries :: Conditional Query To Post Result In Field And Filter Result Records?

Mar 5, 2014

I am working with Access 2010, on vista. What I have is a query made up of two tables, one product the other inventory. (see below) query.jpg

In the product table i have a field called "minimum reorder level". In the inventory table i have two fields one called "number in stock" and "number on order". What i want to happen is "number on order" to be filtered by the result, if the "number in stock", is less than "minimum reorder level", if it is, have the result placed in the "number on order" field. EG. if the "number in stock" = 2 and the "minimum reorder level" = 5 then 3 would be placed in the field "number on order" and only the second record from the query would be visible (see below) Query result.jpg The result of this would mean that the field "number on order" would be populated with the result and the and query would also use this to filter the record.

View 1 Replies View Related

Send Mail Merge With Attachment

Sep 20, 2006

I have been searching the forums about how to send an email using a mail merge Word document with attachments and have not found a way to accomplish this. There are numerous posts on haw to send email using the SendObject function with attachments but I really need to use a Word mail merge to satisfy the requirements set forth by my superiors.

The database uses a query to pull the list of recipients. The query contains the name, email address and a few other informational items that need to be put in mail merge. I also need to attach a second 5 page Word document. At this point, I don’t care if I have to deal with the Outlook security or not, I only have about 20 a day to send but if there is a way to get around it, that would be cool.

Would it be possible to create a Report that looks the same as the mail merge document and send it to each of the recipients from the query and attach the document to that email?

I am running up against a deadline that is fast approaching and any help would be greatly appreciated.:(

View 1 Replies View Related

Modules & VBA :: Send Attachment From Access

Feb 4, 2015

I have a button when pressed that it sends an email from lotus notes and inputs relevant text etc, however I seem to be struggling on how to have an attachment sent with the email. So everytime the button is pressed it will attach a word document.

View 1 Replies View Related

Query Result As Email Subject

Jan 8, 2007

Curently run a Send.Object function on a form to retrieve a unique record via a query. I'd like to be able to send a particular field returned by the query to use as the subject title in the email that is auto-created.
The query will only ever be returning a single record but that single record will change each time it is run.


Any ideas people?


Thanks in advance.

View 1 Replies View Related

Email Each Name From A Query Result (separately)

Feb 12, 2007

I have searched and searched... but I just cannot find this. I know it has to be in here somewhere. Any help is greatly appreciated.

I have a query called "MyLateProjects" that shows results based on a specific number of days since the "project" was entered in to the database. I need to be able to send a "You are late X days" email to each of the project submitters from the values in the records of the query result. I have the fields, for example, of "emailaddress" and "Projectnumber" that I need to include in the To: line and Subject line, respectively. So, if I get five results, I need it to send five separate emails.

Like I said, I have searched and searched, and I cannot find a way of getting this done. I can send the first one from a button if I show the results in a form... but I don't know to automate the send operation as part of the query, nor how to get a separate email sent for each record (would this be a loop of some sort??).

THANKS!! ALL HELP IS APPRECIATED!!

Tom

View 3 Replies View Related

Reports :: Send Email Based On Query From A Specific Form

Jun 27, 2013

I'm trying to send at report based on a Query from a specific form.

Everything is (almost) working fine, except the fact that I can't get a criteria into DoCmd.SendObject method.

My code is:

Private Sub Kommandoknap212_Click()
On Error GoTo MailTilGodkendelse_Err
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Dim MailAtt As String
Dim intSearch As String

[Code] ....

View 6 Replies View Related

Modules & VBA :: Send Query Results In Table In Body Of Email

May 24, 2014

I have created some code to get the records of a query and it puts them in the body of the email but it doesn't format it well for example the email looks like

James | halliwell | 31
Leanne | smith |27
Alexis | smith |8

I would like it to be in a table is this possible,

Code:
Public Function SendEmail()
Dim MyDB As DAO.Database
Dim rst As DAO.Recordset
Set MyDB = CurrentDb

[Code] .....

View 3 Replies View Related

Send Emails For Data Collection With Attachment

Apr 20, 2012

I am trying to send out request-for-quote sheets to vendors and i need to send the image of the product as well. when i send emails for data collection, the attachment is not included. how can i attach images?

View 2 Replies View Related

Modules & VBA :: Generate And Send By Email Individual Reports Based On A Query

Mar 19, 2014

I am trying to make an automation in order generate reports based on query ( person name,person email address ) , export them to a folder in PDF and then send them one by one to each person email address.

What is happening:

- the reports are generated and exported fine
- the email are sent to the right addresses but the first person receives the correct report , the second person receives the report from the first person plus its own report and so on.

Here is my code :

Private Sub MakeReportSendEmail_Click()
Dim MyDB As DAO.Database
Dim MyRS As DAO.Recordset
Dim strSQL As String
Dim strRptName As String

[Code] ....

View 14 Replies View Related

General :: Automated Task - Send Email Address To All Emails In Query

Sep 30, 2013

I want to automate a task in access....

I have a query that may have 6 - 7 different records for example each record contains a different email address, i need to get the first email then send and email to that address then go to the next record get that email address send an email to that email address until its gone through all the records...

I use this code to send an email, dont know how to loop through records and get the email...

Code:
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Dim strPath As String
Dim strFileName As String
Set appOutLook = CreateObject("Outlook.Application")

[Code] .....

View 1 Replies View Related

General :: How To Copy Picture On Attachment And Send It To MS Word

Jul 11, 2012

I want to copy the file stored on a attachment field (.jpg), so i can use it on a Word document as a picture.

I've tried it with bookmarks but no success:

' 'Paste the photo.
.ActiveDocument.Bookmarks("EidPhoto").Select
.Selection.Text = GetPath & "RE EIDPicture" & OwnerFullName & "_eid.jpg"

Then I only get the path of the file, Is there a control that i have to use?

View 1 Replies View Related

Modules & VBA :: How To Send Attachments Using Path Instead Of Attachment Field

Apr 6, 2014

I have some code that attaches any files that are in my attachment field on the current record in to a email this is great but I m starting to realise that this is take up way to much space as it hold a copy in the database and can t afford to go down the sql sever route so what I have done is added some new fields called path1, path2 ,path3 ,path4 and path5 now the user can add the files location to these text box instead of add them via the attachment field also I can now limit number attachments to each record

Code:
Private Sub cmdEmail2_Click()
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Dim OutlookAttach As Outlook.Attachment
Set appOutLook = CreateObject("Outlook.Application")

[Code] ....

Some how I need to change this so it checks fields path1 path2 path3 path4 path5 on the current record and see if anything is entered in these textbox's and follow the paths and attach the files to email

How to make command button . How to add a file path to a text box

1. add new field to your table e.g "path1"
2. add the new field to your form
3 create new command button call it addpath
4 add code below to click on event

Code:
Private Sub addpath_Click()
Dim fDialog As Office.FileDialog
Dim varFile As Variant
' Clear listbox contents. '
Me.Path1.Value = ""
' Set up the File Dialog. '

[Code] ....

This will now save file location path to the path1 text box. To open file path

1.add another command button call it "pathopen"
2. add code below on click event

Code:
Private Sub pathopen_Click()
Application.FollowHyperlink Me.Path1
End Sub

View 2 Replies View Related

Modules & VBA :: How To Send Attachment From Current Open Record

Nov 18, 2013

What I'm try to do is attach any files from the attachment field from the current open record to email i have some code i have manage to get files from the open record to save to destination /temp folder to work so outlook can attach the files but outlook is not opening or putting them in to email also have problem's that i have highlighted in the code in red.

Code:
Private Sub cmdEmail2_Click()
Dim outlookApp As Outlook.Application
Dim outlookNamespace As NameSpace
Dim objMailItem As MailItem
Dim objFolder As MAPIFolder
Dim strAttachementPath As String

[Code] .....

View 1 Replies View Related

General :: Concatenate Email Addresses As A Query Result

Jul 2, 2014

I have a parameter set on the query at run which filters by Region i.e. the box pops up and they enter a criteria..I would like to have a field entered next to Email that would take all the Email Addresses in my query result and concatenate them so essentially I have an email list I can pop in Outlook.

Or alternatively, a solution to allow access to these email lists via a button on a form. It has to be something very simple for an end user to access. For instance right now, to get there list they hit a button to run the query then enter the parameter then if desired, hit another button to export to excel. Today, they use Excel for everything and are used to having the concatenated email addresses in one cell in excel. For this reason, I am trying to have the email addresses concatenated in the query results to mimic what they are used to today. But I am not sold on it if there is a better way that is easy for them.

View 14 Replies View Related

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







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