Modules & VBA :: Email Response - Reply To From A Button
Feb 24, 2014
I have a DB that holds multiple possible email responses, originally set up for just straight up create email based on this information. the Button to created the email works great. Now what I would like to be able to do is Click a 2nd button that instead of creating a new email, it would open a reply to the current opened email. I would still want to push the information to it like it does in the current new email button.
I am sending an email using SendObject. Sometimes it works, and sometimes it makes the computer freeze up with no error message. I have tried this with Outlook running or not running, seems to make no difference.
Code:
'The sub procedure below sends e-mail in response to a click on the Send button. Private Sub SendMessagesButton_Click()
'For Access, define some object variables and make connections. Dim myConnection As ADODB.Connection Set myConnection = CurrentProject.Connection Dim myRecordSet As New ADODB.Recordset myRecordSet.ActiveConnection = myConnection
[Code] ....
I have added some MsgBox () to narrow down where it crashes. It is after 'Five' and Before 'Six'. On the line:
Set appOutlookRecip = .Recipients.Add(eMailAddress)
I am mystified as to why it works OK sometimes, and not others. The email address being used is valid.
I have a form which has a button to email the data out in a standard email message.
Private Sub Command60_Click() Dim MyDb As dao.Database Dim rsEmail As dao.Recordset Dim sToName As String Dim sSubject As String Dim sMessageBody As String
[code]...
This works well enough, however, FIELDS 11 through to 16 contain the venue address. This is all we ll and good if every field of the venue address is populated. here are times when not all of the fields are populated, for instance, the address might only be 5 lines.I know I can do this using IIf statements on a report, but how can i achieve the same thing for the email.
I would like to create a button that when pressed opens up an outlook email. The email address will be populated by one email address every time. I don't want it to automatically send as the body will need to be filled out by the user. It would be useful if the date and time it was sent could be recorded in the form somewhere too (would this be in a text box?).
1- Open the Report called : ConsentForm 2- Print it to PDF printer (report is currently defaulted to that printer driver) 3- Save to folder: C:SOSConsentForms 4- Save as: Consent_[Last]_[First] (these are field names on the form) Result i.e.: C:SOSConsentFormsConsent_Doe_John 5- Then send the file by email (Outlook) to : abc@hotmail.com
I am trying to create a form button that will automatically email each row of a query result to myself. At first the VBA code worked fine with a standard query. However when I use it with a query that contains a reference to a combobox form such as "<=[Forms]![Reminder]![Monthsleft].[Value] And >=0" I get the 3061 run-time error and "Too few parameters. Expected 1." I have included the VBA code below.
Private Sub Command9_Click() Dim MyDb As DAO.Database Dim rsEmail As DAO.Recordset Dim sToName As String Dim sSubject As String Dim sMessageBody As String
[code]....
If you intend to renew the lease, terms and conditions will need to be submitted for ECC for approval (regardless of changes or not in lease rates). If the terms have yet to be confirmed, it is important to begin the negotiation process as soon as possible with a target to provide the ECC submission at least two months prior to the commencement date of the renewed lease. To ensure sufficient time for ECC approval before the contract expiry date, please prepare the ECC paper and obtain necessary endorsements. Submission details can be found here. The ECC submission template and PSD Questionnaire could be found from this link
I am trying to query my records by the current records selected date then send the results in the body of an email on click. I believe I am close but I think there is a problem with the date format because I am getting 3421 Data type conversion error. Here is what I have:
Code:
Private Sub eMail_Click() On Error GoTo EH Dim dbExceptions As Database Dim rstExceptions As Recordset Dim dbDate As Database Dim rstDate As Recordset
I have a Word 2010 document linked to an Access 2010 data source. When a user clicks a button in Access, the Word document loads and performs a email merge using the below VBA code:
Private Sub Document_Open() With ActiveDocument.MailMerge .Destination = wdSendToEmail .SuppressBlankLines = True
[Code] ....
However, as the .mailsubject part is not in the loop it is only retrieving the first Return Code. I have tried to integrate in the loop to no avail. Also, how do I add static text to the Subject, I need something like "Your Return Code" + "Return Code"..
I have a form that records followup activities for protocols. The form allows the user to enter up to six f/u actions from a dropdown menu in six separate fields (called fu1_action, fu2_action, etc).
I am trying to write a query that retrieves only protocols that only have one f/u action selected as "telephone correspondence" and am having trouble. It seems I could write a function in VBA that would somehow loop through the 6 f/u action fields and give a value of 1 to those that have 'telephone correspondence' as a response, and then add them up to give a total of calls for that specific protocol, and then in a separate query only retrieve those that have a total number of calls = 1, but how to get started in writing this.
I really could do with some assistance with this it may sound quite simple but for some reason I cant do this?? and its driving me nuts!
I have a column name [policy] and a column name [movement type]
the rule is you cant have a policy number and different movement types you can have many of the same but not different and there are about 8 movement types
I would like to find all the policy numbers where there are two movement types using a query.
I'm working on a database which is designed to connect to an app called Canvas (www dot gocanvas dot com). It's for a client which runs a team of heating engineers. All the information regarding the engineer's job is uploaded to Canvas through their API as an XML file, and the engineers use an app on tablet to view the job details. When the engineer goes to their customer and does some work, the completed info (which parts were serviced etc) is then downloaded as an XML file via the API into the database. Also, the customer signs on the engineer's tablet to confirm that the work has been done.
Although the XML files for the job data upload and download fine, there's a different API for getting a download of the JPEG which contains the customer signature, and I'm having real problems finding out how to use this.
The API guide says this: ---- The Submissions API is restricted to authenticated users and requires a username and apassword to access. In addition, the ID field is required. If these fields aren't specified, an error is returned.
The result of this webservice invocation will be either a standard JPEG image or an error code.
Example: [URL] ....
All my code (which I've pasted at the foot of this message seems to work fine. There are no errors, and the ResponseBody object appears to contain a byte stream which would be the jpeg... if only I could get it into a jpeg file!
How I go about taking this "stuff" that's come back in the responsebody and actually create a jpeg image file from it? I feel that I'm so close that I can smell it, but can't get the last step!
Here's the existing code :
Code: Sub DownloadImageFile() Dim xhr As Object Dim webServiceURL As String Dim actionType As String Dim PostData As String Dim strResult As String
I have made a query with the name "Confirmation" and it is setup like this:
Name trainee Email Training John John@mail.com Tr one Mary Mary@mail.com Tr two
I also made a button in a report with the title "Send Mail" now is my goal that if i press that button automatically multiple e-mail message's will be generated with data from people in that query. So if click on that "Send Email" button i want two different mails messages generated that will be send to John@mail.com and Mary@mail.com with in the mail body their data.
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'):
I have an automated email system (Lotus Notes) in a Access database I have created and am looking for the code needed to add up to 3 c.c addresses into an email prior to sending automatically.
The code I have to send the email to the To: individual is all working but what code I need to add and where for the c.c addresses of which there could be 1, 2 or 3. The control for To address is EmailTo = CustCopyEmail The controls for the 3 c.c emails are cc_EmailAddress, cc_EmailAddress1 and cc_EmailAddress2.
Here's the code I have:
Private Sub SEND_CC_Click() ' Set up the objects required for Automation into Lotus Notes. Dim Maildb As Object 'The mail database. Dim Session As Object 'The Lotus Notes session. Dim MailDoc As Object 'The mail document itself. Dim UserName As String 'The current users Lotus Notes name.
I searched the forums, I downloaded sample datbases EmailA2K, example, and PrintCurrentRecord_Update however I cannot get my command button to fill the TO: with my customer email address. I have gotten lost in the code so I went with a send object macro. Maybe it's my internet service. I use Compu Serv which is a by-product of AOL. Can that be the problem? Anyway I don't understand code, I wish I did. I select send object as my action in my macro. I leave the object type and object name blank as well as the output format. In the To: I put = [email address]. In the subject I put "From CG" and the Edit Message is set as "no". When I click on the button it opens up my email provider but nothing is in the To:. I first tried to fill in the Object name and type and format and it attached the records in the form, I DO NOt want to do that. All I want is to have the Email Address be filled in the To: by clicking a button. I'm about 8 hours on this and a little on edge. I would like to get a good nights rest and not think asbout this anymore. Any Macro help would be great.
Right now, I have a contact database with email addresses, and would like to know if anyone has any suggestions on how to implement a command button that when I click on it, it will do the action as clicking on a link that says
mailto:anyone@anyone.com
If I type the mailto: before the email address, and click on it, it will open the email message window, but I am looking for a way to have the user click on a button and then it opens the email message window.
I have set up a work order database. On the Work Order Submission form I have a command button that adds the record to the table. I also have a button to email the Submission Report. When the user fills out the form and clicks the Add button the record is added to the table. The user then has to scroll to have the record reappear in the form and then click the Email command button. This works fine but I want to make this a one click operation.
I have a filter on the report that will be emailed to limit the report to just the current record. The filter is: [ID] = Forms![WO Submission]![ID] where ID is the Primary Key for that record. If the record has not yet been added to the table and thus has no primary key, the report to be emailed will contain no record info. I'm thinking I may have to use a temporary table but I'm clueless about how to make that work. Any suggestions?
I would like to create a database that would enable me to select various options (from dropdown lists) which I could then have tidily arranged in an email that would automatically be sent to the recipient. Before I attempt to design the facing page I'd like to know if this is an option in Access?
1:is it possible to have a clickable button beside each record in the report format that when clicked runs another report and inputs data into parameter querys automatically that the second report asks for? Etc. the second report will ask for [Username], [start Date], [end date]it copies and pastes the details from the row clicked into these parameters? or get it to work in a simular way? reason being for this the details need to be in a certain format layout that then on a button click Emails the report as a PDF
2:is it possible to have a button on the report screen that will Email the report as a PDF file with only the parameter data shown?
I'm trying to create a button who is able to send a email with an attachment.The attachment will be all the time the same file.The email address to sent to is one of the field of the database.I need a copy sent in my email address as well.
Like the title says I need a command button to print preview and email two reports. I tried using macros but the problem I have is that it'll send out two emails instead of one email with two attachments. The other problem is that it won't recognize current pages information so it'll show two blank reports. But If I go to next record and come back in form view, it reognizes the changes and the reports look fine. Any help would be appreciated.
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.
I've attached my access file...if anyone could help I would appreciate it very much!
If you click on the Export & Email tab on my form, there is a button which describes what i want to do in the caption.
Basically...
When the button is clicked i want a warning message box to appear saying do you want to continue Yes/No. No would just cancel it.
Yes would do the following:
Export an Excel file of "Magtable" and save to C:Magazine BackupMagazine Counter.xls and W:Magazine CounterMagazine Counter.xls
Then (i dont think the order of the following matters)
Email the excel file to two people.....if its easy to do this with no data input needed by the user (ie: not having to type the subject, who its too, body or press send.....if this is too complex then that is fine..having as much in as possible would be good though)
Then I want the values in Magtable, Amount to be reset to 0 - this may have to be done before the email is sent?
BTW the company i work at uses Lotus Notes only as an email program....As long as it pops up a new email in lotus notes with the excel file as an attachment then that would probablly be enough.
Hope this makes sense :S Any help would be VERY appreciated!
After inputting data into a text box on a form i want to click on a command button which will open an email program and then put the text there so i can send it.
So I have created this database for a lessons learnt system. Is it possible in Access 2007 to create a button that if pressed automatically sends an email out to someone? So my main form in the database is a split form which contains a search filter, which works well and also contains a button called add new lesson. This button is linked into another form and when pressed brings up this new form. In this form it has a save and close button. What I actually would like is when the form is updated and this save and close button is pressed, an email is sent to a "project head" who has to confirms the information before the data is saved into the database. Is this actually possible?