Sending Email With Attachment Of Certain File?
Feb 13, 2014I want to send email which should be attached certain file automatically and sent to given email Id.
View RepliesI want to send email which should be attached certain file automatically and sent to given email Id.
View Repliesi 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
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 RelatedI am able to create an excel file from a query and export to a folder. How can I send it to in an email automated at the time of export.
View 1 Replies View RelatedI have created an action log database that sends an email when a new action is entered. I would like to launch the database using a hyperlink in the email, but can't seem to get it to work. All users have a copy of the front end on their desktop, so whatever I add to the email needs to launch the front end for any user signed on to their own desktop.
This is what I have and it sends a hyperlink but I click it, I get an error saying it can't find the file. I don't know how to word the path name for any user?
With obMsg
.subject = "New action request for " & team
.To = people
[Code].....
I am currently using vb code to send an email in Access on the click of a button. I want the database user to be able to enter the recipient in a text box [ToEmail] which is on form [GroupStockProfiler]. However, I'm unsure how to put this into my code. I currently have the following which doesn't work (unless I put a specific email after 'To'):
Private Sub Command414_Click()
Const cdoSendUsingPickup = 1
Const cdoSendUsingPort = 2
Const cdoAnonymous = 0
[code]...
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
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?
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
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...
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?
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?
I am useing DoCmd.SendObject to send emails - however I get outlook opening an email with my To, BCC fields filled in , however I am stuck in the new email screen - ie can't get to a previuos email to copy and paste text - like it is dialog?
Is there any way around this.
Thanks Paul
Hi!
I got a question about emailing.... I don't think this is possible but I thought why not ask....
Is it possible to have a button on a form, that when it's pushed, it sends an email with a report included to a certain email adress?
thanks!
-jake
I have been able to create a form that will send an email automatically when the form is opened. Tha problem is, the email will not actually send until I open Outlook. Any ideas?
Thanks in advance.
I am looking to write some code that "OnSave" in a form will run some code
No worries about writing the code on an event, I will figure that out...
What I want to do is:
If txt box A is not null then send an email to some recipient.
QUESTION:
Does anyone have an example of code that will send an email to someone from Inside Access.
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
Hi guys,
i want to send an email to several people when someone else enters a complaint in my database.
I have a form which displays the complaint with a reference number, recordsource is "tblKlachten". i have query that is set to return only those emails i want it to send to called "qerMailBeheerder". In there is a field called "email".
Now, whenever i a user closes the form after adding a complaint, i want at the same time a mail sent to those ppl in the query with the subject the reference number of the complaint (field called "Referentienummer") and in the body other information from the fields on the form. Like the field "complaintdecription" and "clientname".
Now, i know about the sendobject thing, but i have tried alot and non would do what i want. Can anybody help me with the code.
Many thanks
Hello,
I am a little lost here. My prorgam has a form where I added a button. When clicking on the button, it is supposed to use some fields from the form and add them to an email with additional info which is added when the email opens up and is about to be sent. My boss uses Mozilla for his email account. What would be the code on the Onclick event be and do I have to set up anything else??
So far I have this code but it is for Microsoft Office Outlook not for Mozilla:
Set objOutlook = CreateObject("Outlook.Application")
Set ObjOutlookMsg = objOutlook.CreateItem(olMailItem)
With ObjOutlookMsg
.To = str_Recipient 'str_Recipient is obtained before this code
.Subject = str_Subject 'str_Subject is obtained before this code
.Body = str_Body 'str_Body is obtained before this code
.readreceiptrequested = lb_ReadReceipt
.Display 'to display the message instead of sending it
End With
Thank you very much
I'm sending an email from a form to Outlook express. But before it opens Outlook I get a question that states "a program is trying to access email address you have stored in Outlook" I then have to click ok and then another window opens and askes the same question. How can I eliminate these warning messages??
Thank You
Hi,
So far I know there is a wizard for being able to create a button that sends a Form Report. What I really want to do though is when the user clicks the button on the form, just the form is sent/attached to the email, effectively giving the viewer/receiver a screenshot of the Form in question.
Thanks in advance,
Barret
I have looked through the forums for an answer to a problem I am having,
but I can't seem to find the complete answer.
I just started work on an inventory database that was made by other people;
it is a fairly large database. One of the forms is for equipment maintenance
and in it, you fill out several fields. What needs to be done is an email sent
out to 2 people in the department; they are selected via a combo box and this
runs a query that fills in a table with the proper email addresses and matches it
to the proper job in the table. A due date is inputted in a standard text box.
The emails are then supposed to be sent out on the due date provided.
For some reason, there is no code at all (that I can find) that even runs Outlook,
although it supposedly worked a while back. I have read that timers would help
with this, but I am not quite sure where to go with it. Also, does the email have
to be sent from the person that is logged into Outlook at the time the email is sent,
or can it be sent under another email address no matter who is logged into Outlook
at the time.
Any help would be greatly appreciated.
Thanks
I have made a form to send emails, I used this code I found somewhere:
Code:
Private Sub cmdEnviarOutlook_Click()
Call EnviarEmail(Me.txtEmail, Me.txtAsuntoEmail, Me.txtLeyenda)
End Sub
[code]...
I configured Outlook with my gmail account.The code works fine (after adding references) but when I take a look to the sent-box in Gmail, I find that the email is duplicated.If I send an email normally or even using docmd.sendobject, that doesn't happen.
One more question. I tried this function in two computers and in one of them Outlook asks for permission while it does not in the other one. I believe it is related with Outlook config.
- 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).
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.
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].....