Access Uses HTML To Send Email, Please Help

Aug 29, 2004

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.

View Replies


ADVERTISEMENT

Using VBA To Send HTML Email - Unordered List Indent

Jan 7, 2015

How to remove the indent on a <ul> item.

The following link is where I am sourcing how to do it, however no matter what I do within my VB, the email comes up with about a full inch worth of an indent on the UL.

[URL] ....

Code:
"<style>ul { display: block; list-style-type: disc; margin-top: 1em; margin-bottom: 1 em; margin-left: 0; margin-right: 0; padding-left: 0; }</style>"

And then further down in the body where the UL is called

Code:
"<p><ul><li>Print this email and return it with your shipment.</li><b>OR</b><br><li>Include your Dealer Number, Serial Number and Claim Number with your shipment.</li></ul></p>"

No matter what I change, the indentation doesn't move. See below...

View 14 Replies View Related

General :: HTML Body In Email Sent From Access

Sep 18, 2012

I have a database to send e-mails from access trough Outlook. The issue is that I would like the body of the e-mail to have hyperlinks, colours, bolds and that I can get it from plain text.

This is the code I have:

Dim MyDB As Database
Dim MyRS As Recordset
Dim MyTable As Recordset
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

[Code] ....

How can I make the body to be HTML format, or, can I have a e-mail template storaged in my PC and then indicate to use it whenever the e-mail is sent?

View 4 Replies View Related

Modules & VBA :: Replace Function In Access 2007 For HTML Email In Outlook 2010

Aug 4, 2014

My company recently upgraded our MS Office from 2007 to 2010 (except for Access).

Previously, when I had Access 2007 and Outlook 2007, I had a process that generated 50+ dynamic emails from an Outlook template file (.oft).

The code would loop through a listbox and replace the template's default text to a string of text specific to the selection in the listbox by utilizing the Replace() function on the MailItem .HTMLBody.

Since the upgrade to Outlook 2010, the code is able to run, however, the Replace() function is no longer working; Instead, each email that is generated maintains the template's default text.

The only thing that is not working is the Replace() function, all other aspects of the code work fine.

I've provided a simplified version of the code below:

Dim myOlApp As Outlook.Application
Dim objMailMessage As MailItem
Dim stBody As String
Set myOlApp = Outlook.Application
Set objMailMessage = myOlApp.CreateItemFromTemplate("C:UsersDesktop emplate.oft")

[Code] .....

I've recreated the template file in Outlook 2010, thinking that the template created with Outlook 2007 would be the culprit, but to no avail.

What could have changed from Outlook 2007 to Outlook 2010 that would render my previously valid code ineffective?

Are there certain references I need to enable in both Access and Outlook to allow VBA in Access modify the content in an Outlook email?

View 12 Replies View Related

Can I Send Email From An Access Application.

Jun 2, 2005

Does anyone know if it is possible to send an email when a button is clicked?

View 1 Replies View Related

Send Information From Access To Email

Jul 18, 2007

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:

cmdEmailAssignedTo : On Click

="ID " & [ID] & ": " & [Title] & " Status: " & [status]

My database is almost complete just having this one problem... is it a function within access that can not be resolved?

I will send the database over if needs be...

Thank you in advance,

Jay :eek:
(Slinky)

View 7 Replies View Related

Send Email With High Importance Using Access

Jan 12, 2007

Is there any code that will allow me to send an e-mail as "High Priority / High Importance" through Access?

Here is the code I am using currently:

Private Sub Save_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Dim mail
Set mail = Nothing
' Send by connecting to port 25 of the SMTP server.
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML

Const cdoSendUsingPort = 2

'==== A/R 60 Code Start ====
ElseIf Me![A/R Code] = "60" Then

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?

View 11 Replies View Related

Forms :: Access Send Email Using Outlook

Mar 13, 2013

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

[code]....

View 10 Replies View Related

General :: Send Email From Microsoft Access

Jun 18, 2015

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

[code]....

View 5 Replies View Related

Enable User To Send Email Via Access?

Aug 11, 2011

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.

View 3 Replies View Related

Simplest Way To Send An Email From Access Using Lotus Notes

Jan 3, 2008

does anyone know what's Simplest way to send an email from Access using Lotus Notes
(no attachment required)

View 10 Replies View Related

Runtime Error When Trying To Send Email Using Access 2010

May 29, 2012

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.

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

How To Send Automatic Reminder Email In MS Access 2010

Apr 1, 2014

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.

View 3 Replies View Related

Send Automatic Email Upon Receiving A Request In Access Through Outlook

Nov 11, 2014

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.

View 3 Replies View Related

VBA To Send Email From Access - Table Pasted In Message Body

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

General :: Send Email To Individual Clients Via Access Database 2003

Sep 17, 2014

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.

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

Modules & VBA :: Send Email From Access 2013 Through External SMTP Server?

Jun 5, 2015

I have Access 2013, Win 7, Outlook 2010 (32-bit).I want to send an email from Access, but not through Outlook. Instead I want to connect to an external SMTP server. I've found a few examples that doesn't work for me. With code including for example

Code:
Set ObjMessage = CreateObject("CDO.Message")

I get an "Error 429: Object can't be created in Active X-component" (My translation from Swedish).With code including this:

Code:
Dim oEMail As New CDONTS.EMail

I get "user defined type has not been defined" (my translation again).I have working code for sending email through Outlook, which works fine. But, Outlook adds a lot of span tags, making it impossible to read for certain screen readers used by visually impaired people, therefore I can't use Outlook.

I've tried to read up on the matter (CDO), and think that maybe the CDO library etc is not included on my computer?can I download it?

View 10 Replies View Related

General :: Send Outlook Email Based On List Of Emails In Access Query?

Sep 15, 2014

I've setup a selection form that returns a specific list of email addresses in a query.

What I can't work out is how to press a button and have the email addresses populate the To: field in a blank Outlook email - I don't need any bells or whistles.

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

Forms :: Using HTML To Format Body In Send Object Method?

Jun 26, 2014

Can I use html to format the message body in send object method ? If I can, how to do that.

View 5 Replies View Related

Email HTML Body Code

Aug 27, 2015

I can create PDF's, DOCX's retaining the PDF formatting save them back to different network locations and then retrieve and attach to emails that are generated for different areas, however I have been asked to scrap the attachment and insert the content of the attachment directly into the body of the email. I have had a good browse around the net with no real approach. The code below simply gets the recepients email address adds the subject and then is looking for the .HTMLBody which simply comes through in the body as

"O:divAKLResgroupE - ReportsHTML FilesDRAFT TEST .html".

.To = RScoloumdetail(2) ' Gets Email Address
.CC = ""
.BCC = ""

[code]....

View 2 Replies View Related

Gaps In Between Tables On Html Email Template

Sep 21, 2006

my html template is built inside access.. the form button is clicked and the template opens in outlook.

it looks fine in outlook.. so i send the email.. when i receive the email in outlook, it looks fine..

here is what it looks like

http://www.londonheathrowcars.com/image2.jpg

however, i sent the same template to a gmail and hotmail address to see what it looks like..

it looks fine in hotmail
http://www.londonheathrowcars.com/image3.jpg

however in gmail it looks like this..

http://www.londonheathrowcars.com/image1.jpg

now, these gaps are appearing in between tables..

<table>blablabl</table>GAP<table>...

now, my question is.. is there anything i can add to the code that will remove these gaps..
i know my code is messy.. at the moment however it begins with <table> and ends with </table> (the main wrap table)

i realise i may need to add some kind of html type or something, but i dont know what..

as always, if anyone can shed some light on this matter i would be ever grateful..

thank you

below is the code

CODE
Option Compare Database

Private Sub emailbutton_Click()
'References: Oulook Library
Dim strEmail, strSubject As String, strBody As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem

Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)

strEmail = Me.emailadd

strBody = "<table border='1' width='610' id='table1' cellspacing='0' cellpadding='5' bordercolor='#5A79B5' align='left'><tr><td align='center'><table border='0' width='600' id='table2' cellspacing='0' cellpadding='0'>" & _
"<tr><td width='300' height='61'>&nbsp;</td><td width='300' height='61' align='center'><img border='0' src='http://www.londonheathrowcars.com/emaillogosmall.gif' width='300' height='61'></td></tr><tr><td width='300' height='30'><font size='2' face='Arial' color='#000080'>FAO</font></td>" & _
"<td width='300' height='30' align='center'><b><font face='Arial' color='#5A79B5'>-------- London Heathrow Cars --------</font></b></td></tr></table><table border='0' width='600' id='table3' cellspacing='0' cellpadding='0'><tr><td>&nbsp;</td></tr><tr>" & _
"<td><font size='2' face='Arial' color='#000080'>Thank you for your booking request via our website.<br>Details of the requested transfer and our fare are as follows:</font></td></tr><tr><td>&nbsp;</td></tr><tr><td><hr color='#5A79B5'></td></tr></table>" & _
"<table border='0' width='600' id='table4' cellspacing='0' cellpadding='0'><tr><td width='200' height='20'><font size='2' face='Arial' color='#000080'><b>Job Date:</b></font></td><td width='400' height='20'><font size='2' face='Arial' color='#000080'>&nbsp;&nbsp;This</font></td>" & _
"</tr><tr><td width='200' height='20'><font size='2' face='Arial' color='#000080'><b>Pickup Time:</b></font></td><td width='400' height='20'><font size='2' face='Arial' color='#000080'>&nbsp;&nbsp;This</font></td></tr><tr><td width='200' height='20'>&nbsp;</td><td width='400' height='20'>&nbsp;</td>" & _
"</tr><tr><td width='200' height='20'><font size='2' face='Arial' color='#000080'><b>From:</b></font></td><td width='400' height='20'><font size='2' face='Arial' color='#000080'>&nbsp;&nbsp;This</font></td></tr><tr><td width='200' height='20'>&nbsp;</td><td width='400' height='20'>&nbsp;</td>" & _
"</tr><tr><td width='200' height='20'><font size='2' face='Arial' color='#000080'><b>To:</b></font></td><td width='400' height='20'><font size='2' face='Arial' color='#000080'>&nbsp;&nbsp;This</font></td></tr><tr><td width='200' height='20'>&nbsp;</td><td width='400' height='20'>&nbsp;</td>" & _
"</tr><tr><td width='200' height='20'><font size='2' face='Arial' color='#000080'><b>Vehicle:</b></font></td><td width='400' height='20'><font size='2' face='Arial' color='#000080'>&nbsp;&nbsp;This</font></td></tr><tr><td width='200' height='20'><font size='2' face='Arial' color='#000080'><b>Set Fare:</b></font></td>" & _
"<td width='400' height='20'><font size='2' face='Arial' color='#000080'>&nbsp;&nbsp;This</font></td></tr></table><table border='0' width='600' id='table5' cellspacing='0' cellpadding='0'><tr><td><hr color='#5A79B5'></td></tr><tr><td>&nbsp;</td></tr><tr><td>" & _
"<font size='2' face='Arial' color='#000080'>Our drivers are courteous, experienced and smartly presented. In addition, all of our vehicles are modern, clean and comfortable. To book this transfer, kindly reply to this email or call us on the following:</font></td>" & _
"</tr><tr><td>&nbsp;</td></tr><tr><td><table border='0' id='table9' cellspacing='0' cellpadding='0'><tr><td width='150'><b><font face='Arial' size='2' color='#000080'>Freephone (UK Only):</font></b></td><td width='150' align='left'><b><font face='Arial' size='2' color='#000080'>" & _
"&nbsp;&nbsp;0800 505 3231</font></b></td></tr><tr><td width='150'><b><font face='Arial' size='2' color='#000080'>International:</font></b></td><td width='150' align='left'><font face='Arial' color='#000080' size='2'><b>&nbsp;&nbsp;+44 (0) 208 814 2727</b></font></td></tr></table></td>" & _
"</tr><tr><td>&nbsp;</td></tr><tr><td><hr color='#5A79B5'></td></tr><tr><td><b><font size='2' face='Arial' color='#5A79B5'>Hasan Karim - Operations<br>London Heathrow Cars<br>&nbsp;</font></b></td></tr></table><table border='0' width='600' id='table10' cellspacing='0' cellpadding='0'>" & _
"<tr><td><table border='0' width='325' id='table11' cellspacing='0' cellpadding='0'><tr><td width='75'><font face='Arial' color='#5A79B5'><span style='font-size: 8pt'>Address:</span></font></td><td width='250'><span style='font-size: 8pt; font-family: Arial; color: rgb(90, 121, 181);'>" & _
"&nbsp;&nbsp;Suite 7, Jolyon House, Amberley Way, TW4 6BH</span></td></tr><tr><td width='75'><font face='Arial' color='#5A79B5'><span style='font-size: 8pt'>Phone:</span></font></td><td width='250'><span style='font-size: 8pt; font-family: Arial; color: rgb(90, 121, 181);'>&nbsp;&nbsp;+44 (0) 208 814 </span>" & _
"<span style='font-family: Arial; font-size: 8pt; color: #5A79B5'>2727</span></td></tr><tr><td width='75'><font face='Arial' color='#5A79B5'><span style='font-size: 8pt'>Fax:</span></font></td><td width='250'><span style='font-size: 8pt; font-family: Arial; color: rgb(90, 121, 181);'>" & _
"&nbsp;&nbsp;+44 (0) 208 399 6500</span></td></tr><tr><td width='75'><font face='Arial' color='#5A79B5'><span style='font-size: 8pt'>Web:</span></font></td><td width='250'><span style='font-family: Arial; font-size: 8pt; color: #5A79B5'>&nbsp;&nbsp;http://www.LondonHeathrowCars.com</span></td></tr><tr>" & _
"<td width='75'><font face='Arial' color='#5A79B5'><span style='font-size: 8pt'>Email:</span></font></td><td width='250'><span style='font-family: Arial; font-size: 8pt; color: #5A79B5'>&nbsp;&nbsp;info@LondonHeathrowCars.com</span></td></tr></table></td></tr></table></td></tr></table>"

strSubject = "London Heathrow Cars - Booking Request"
With objEmail
.To = strEmail
.Subject = strSubject
.HTMLBody = strBody
'.Send 'Will cause warning message
.Display
End With

Set objEmail = Nothing
End Sub

View 1 Replies View Related

Modules & VBA :: HTML Format Email With Hyperlink

Aug 20, 2014

I am using the following vba code to create and send an html format email message. The key information in the email is a hyperlink to a network drive folder location using [Directory] as a hyperlink table value to get the address that is stored like this:
K:PipelinesP9 - TEP ProductsMOP AID-1500Final Approved

The email hyperlink that is produced looks like this:

#K:PipelinesP9_-_TEP_ProductsMOP_AID-
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Dim MOPVDB As String
MOPVDB = "H:PGADSBYMOP VALIDATIONTRACKINGMOPVDBMOP Validation DatabaseFE.accdb"
Set appOutLook = CreateObject("Outlook.Application")

[code]...

View 1 Replies View Related







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