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 Replies
ADVERTISEMENT
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
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
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
Jul 25, 2013
I'd like to send a query result via email attachment daily without user intervention. Is it possible?
View 3 Replies
View Related
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
Aug 21, 2006
Hello Everyone,
My Situation: I have a form which merges with a table of 123 Names & Addresses. The only thing these records have in common is an ID #. And the name of the company the ID Number belong to.
Now what I need to do is send in an Email the ID# and Company that the ID# belong to.
Here is an example: Toys R US #45
In the records there is "Gi Joy"
"XBOX"
But they all are connected to the #45
When I try to send from the form I get a table as an attachment with all of the records in excel format when using the following code:
DoCmd.SendObject acSendForm, "frmPeople", acFormatHTML, "sample@aol.com", , , "ID# Information"
I need to send just the ID# in a table but not as an attachment in Outlook. I have looked for examples and I seen none anywhere.
If I could just send a table with one row and nothing but the ID# Information, I would be so happy...
View 2 Replies
View Related
Nov 8, 2007
Afternoon all,
This is one I haven't come across before.
I have a table with a list of contact details/company details etc. I would like to send an email to each customer in this list in one fell swoop essentially asking the same question but tailored for that customer (or as easily as possible).
Any help would be really appreciated.
Thanks.
View 10 Replies
View Related
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
Aug 11, 2011
I want to be able to send email and in the body i want the my table be pasted in email body...
Is that possible?
View 3 Replies
View Related
Feb 11, 2013
I have a split form that can be filtered with a combo box. It filters out all "counties" and then shortens the list for me. Now I have the following code attached to a Send E-mail button:
Code:
Dim oOutlook As Object
Dim oMail As Object
Dim strAddr As String
Dim MyDB As DAO.Database
Dim rstEMail As DAO.Recordset
[code]....
How do I have the recordset open only the filtered recordset and not the entire table?
View 1 Replies
View Related
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
Jul 19, 2013
I am using Access 2010 and I want to be able to open a blank email addressed to the contact I am viewing in my Access form. I have been successful in creating a button which opens Outlook, but I don't know what code to put in the 'To' field of the EmailDatabaseObject page so that it picks up the email address of the contact I am looking at.
View 2 Replies
View Related
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
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
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
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
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
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
Feb 9, 2015
I have two tables
1) has email address, and Store ID
2) has multiple records per store
I need to write a procedure to send a separate email to each store that contains the records found in table 2 ( excel format).
View 3 Replies
View Related
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
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
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
Feb 17, 2007
Hi,
I was wondering if it's at all possible to add an attachment which is a pdf file to an email? I've searched this site and can't seem to find anything on this.
Thanks
Geno
View 1 Replies
View Related
Mar 15, 2007
Hi all,
For my db, which has send object command to send a *.snp report in email object, I want to include some more attachments. On click event should get the files from a local drive and attach to email message along with report.
Could some body help me towards this point?
View 6 Replies
View Related
Aug 16, 2006
Hi all
We have been using
Docmd.Sendobject, "name", acformatrtf, to, cc etc
Is there any way to have a form within access just like a compose format wherein we have option to attach files?
View 8 Replies
View Related