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.
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")
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
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.
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
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.
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?
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
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
- 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 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
I 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
I currently have a database which logs issues that come in to me from the business. The database has been designed to keep all stakeholders informed of there request and for the user to write to the stakeholder with a responce through Access. (The reason for this is so the database keeps track of all responses sent back to the stakeholder.)
However even though i am using a memo box the database will only send about 255 characters and no more. I understand this is the max value for a text box however this should not be the case for a memo box. :eek: :confused:
Is there anything i can do i am currently using the following code:
I'm updating a database that automatically sends an email to the drafts folder of Outlook. The developer that created the database used VBA code to call html code written in a table. The html code contains the body of the letter. I've figured out most of it but I need to include a date (one month from the current date) in the body of the letter. Unfortunately I've been researching java script and html all weekend and still haven't managed to figure that one out. Can anyone out there help with this? Also is this normal to include html and javascript in Access, I have never seen it before. Are the benefits good? I have serious studying to do if this is the case.
Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields ' Set the CDOSYS configuration fields to use port 25 on the SMTP server. With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort 'ToDo: Enter name or IP address of remote SMTP server. .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "usahm204.amer.corp.eds.com" .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10 .Update End With ' Build HTML for message body. strHTML = "<HTML>" strHTML = strHTML & "<HEAD>" strHTML = strHTML & "<BODY>" strHTML = strHTML & "This is an automated e-mail to let you know that <b><font color=#FF0000>" & [Name of Requestor] & "</b></font> from <b><font color=#FF0000>" & [Department of Requestor] & "</b></font> has submitted a new <b><font color=#FF0000>A/R " & [A/R Code] & "</b></font> request in PERD." strHTML = strHTML & "</BODY>" strHTML = strHTML & "</HTML>" ' Apply the settings to the message. With iMsg Set .Configuration = iConf .To = "<Carol.Patukonis@examhub.exch.eds.com>" 'ToDo: Enter a valid email address. .Cc = "<Elisa.Chandler@examhub.exch.eds.com>;<Deborah.Davis@examhub.exch.eds.com>" .Bcc = "<Carlene.Vitello@examhub.exch.eds.com>;<Jason.Boney@examhub.exch.eds.com>" .From = "PERD Request<Jason.Boney@eds.com>" 'ToDo: Enter a valid email address. .Subject = "New A/R " & [A/R Code] & " Request" .HTMLBody = strHTML .Send End With ' Clean up variables. Set iMsg = Nothing Set iConf = Nothing Set Flds = Nothing '==== A/R 60 Code End ====
I have tried using .Priority = "High" and .Importance = "High", but I keep getting an error stating this object property is invalid. What can I use to set a priority (Low, Normal, High) on the e-mail using the above code?
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
Ive recently developed in Emailing from Microsoft Access. When I was researching email methods from Access a thought occurred to me that there should be an A.P.I. that would do this the easy way.All of them did have a web A.P.I. which was all I needed to translate a web request from the other language examples given.
Code: Dim reportName As String Dim path As String Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") Dim oFile As Object Dim strAttachments As String Dim strTransPort As String Dim byteData() As Byte
Any way to enable the user to send an email via access?
I would like to add a "Report Bug" button to my main form where the user is able to type a description of a bug that they encountered and it will be sent to my email.
I'm not sure if this is possible. If not I could always resort to storing these bugs in a table instead.
We are currently using Access 2007 and I've got a database that sends emails out to multiple users depending on the data that was entered. We are about to upgrade to Access 2010 and I am testing it now. I was originally getting runtime error '287' when I was adding addresses to a Recipient object. I got past that by adding the addresses in a string and concatenating. Now I'm getting the error with .Send.
I created a Tracking System and would like to send an automatic reminder to the person the ticket has been assigned to, using the due date and the text message in the field "reminder message". Once the message send, I want the database to recognize and not send it again. I want the database to send a new message if the due date has changed.
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.
I have a requirement to send a email to individual clients via my access database 2003 . I am using the email address of the client in the current open form . I then created a query using the id to filter that particular client, this query then becomes my record set.The content for the email is held in a .txt file , On my c drive . Every things appears fine however the fonts that I select in the .txt file are not being use in the actual email body. I created a word document with my preferred fonts and copied and pasted them into the .txt file but on sending the email the selected fonts do not appear.
I have attached a demo of what I am trying to do . To test enter your own email in the email address field of the form . Note the .txt file is on the C:/ drive.