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 Replies


ADVERTISEMENT

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

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

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

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

Email Attachment

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

Email Attachment

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

Email Table With No Attachment?

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

Email From Access With Attachment.

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

Mailmerge Email With Attachment

May 21, 2012

In my database which is used by a charity I have a button which opens a mailmerge email document in MS Word using the following Visual Basic code -

FollowHyperlink "C:Our FoldersBWMCJuly Donors Email.docx", , True, True

This mailmerge document draws its personal information from a query in my database. And sends off personal emails to a number of donors.

I want to attach a personal document called 'Allocations.docx' which is also a mailmerge document drawing its personal information from the same query. How can I automate the attachment of this document to the email so that each donor gets their own email plus their own attachment?

Can something be added to the existing line of VB which will do what I want? If so, what do I need to add?

View 8 Replies View Related

Modules & VBA :: Sending Email With PDF Attachment

Dec 16, 2014

i am trying to send a email with a pdf-report attached based on a report (rap_factuur_klant_pdf).I am using MS Access 2007 and Outlook 2007..

Code:
Dim sAddr As String, sSubj As String, sFor As String
Again:
sAddr = InputBox("E-mail address:")
sSubj = "Report"
sFor = Left(sAddr, InStr(1, sAddr, "@") - 1)
DoCmd.SendObject acSendReport, rap_factuur_klant_pdf, acFormatPDF, sAddr, , , sSubj, "BLA BLA BLA"
DoEvents

View 5 Replies View Related

Sending Email With Attachment Of Certain File?

Feb 13, 2014

I want to send email which should be attached certain file automatically and sent to given email Id.

View 1 Replies View Related

Email TXT File As Attachment From Access?

Jan 2, 2014

I am trying to run a script to look for the latest file in the path: "C:UsersmeDesktopReports and grab the latest file and email it to recipient? Right now my script out put the .txt to a the folder but can figure out how to send that file as attachment?

View 14 Replies View Related

Access To Lotus Notes Email Attachment

Jun 26, 2007

I wish to attach to an email a specified "Shortcut" such that recipients will be able to simply click the "attachment and the Access application will open.

I have searched the forum quite extensively but the perspiration has overtaken the inspiration so any assistance would be appreciated.

Below is the complete code that I am using

Private Sub Combo206_Click()

Maint_Sup_Close = Now()' Update a field
Dim Attachment As String
Dim MailDoc As Object
Dim AttachME As Object
Dim EmbedObj As Object

Dim s As Object
Dim db As Object
Dim doc As Object
Dim rtItem As Object
Dim Server As String, Database As String
Dim strError As String
Dim PI As String
Dim Description As String
Dim Work As String

Dim Email As String
Dim Docket As String

PI = Me.PI_No_1
Description = Me.Desc
Email = Me.Created_Email
Docket = Me.Docket_ID
Work = Me.Work_Required

Set s = CreateObject("Notes.notesSession")
Server = s.GETENVIRONMENTSTRING("MailServer", True)
Database = s.GETENVIRONMENTSTRING("MailFile", True)
Set db = s.GETDATABASE(Server, Database)

On Error GoTo ErrorLogon
'see if user is logged on
Set doc = db.CREATEDOCUMENT
On Error GoTo 0

doc.Form = "Memo"
doc.importance = "1" '(Where 1=Urgent, 2= Normal, 3= FYI)

'Send an e-mail to
doc.SENDTO = Email
doc.RETURNRECEIPT = "1"
doc.Subject = "Maintenance Request Closure"

Set rtItem = doc.CreateRichTextItem("Body")
Call rtItem.APPENDTEXT("Maintenance Request " & Docket & " for " & PI & " " & Description & " This request was created by yourself and has been Completed. Please confirm Completion")
Call rtItem.ADDNEWLINE(1)
Call rtItem.APPENDTEXT("")
Call rtItem.ADDNEWLINE(1)
Call rtItem.ADDNEWLINE(2)
Call rtItem.APPENDTEXT("Request Details were")
Call rtItem.ADDNEWLINE(2)
Call rtItem.ADDNEWLINE(3)
Call rtItem.APPENDTEXT(Work)
Call rtItem.ADDNEWLINE(3)

Works fine down to here

next line gives error 13 Type Mismatch

Set AttachME = doc.CreateRichTextItem.Add("file:\absmanuf_serverabsmanuvMaintManagReposit oryEmail_Cell_Mcs_Maint.mdb.lnk")
SetEmbedObj = AttachME.EmbedObject(1454, "", "\absmanuf_serverabsmanuvMaintManagRepositoryE mail_Cell_Mcs_Maint.mdb.lnk")




doc.SaveMessageOnSend = True
Call doc.Send(False)


Set doc = Nothing
Set db = Nothing
Set s = Nothing
Set rtItem = Nothing

MsgBox "Message Sent"



ErrorLogon:
If Err.Number = 7063 Then
MsgBox " You must first logon to Lotus Notes"
Set doc = Nothing
Set db = Nothing
Set s = Nothing
Set rtItem = Nothing
End If


End Sub


I am a bit out of my depth and would appreciate a guru correcting the error of my ways

Regards

Len

View 3 Replies View Related

Modules & VBA :: Import Email Attachment (Excel) To MS Access

Sep 20, 2013

- I have emails with excel attachments coming in multiple times a day to outlook.

- I want to click a button in Access and automatically import the last excel attachment in my email in box based on the timestamp of when it came in (thus getting the last one).

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

Modules & VBA :: Showing In Access If Email In Outlook Has Attachment

Oct 15, 2014

I found a code that will go trough an emailbox and export all emails to a table in access. This part is working OK (except the received date). I also wante to show in the table if the email contains an attachment, but that part is not working at all. The project actually is meant to store the emails on a shared drive and attachments and have the emails in Access so I can see them all and recall the one needed.

Code:
Private Sub Command14_Click()
Dim TempRst As DAO.Recordset
Dim rst As DAO.Recordset

[Code].....

View 8 Replies View Related







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