first of all - big thanks to Bob and VB who trimed my messy coding into something more manageable
below is the code so far (works a dream at work - slightly cocked up at home )
Now I like this little beast so I thought I would add a few more sections to it
like a heading on each paragrapgh (BoldP1) BoldP2.....
so 3 pargrapghs and 3 headings -- end effect - I is liking a LOT.. so I thinks to my self I'll add a few more (8 in total )
then code bitches at me too many lines ? - any way around this little problem
are there any little Access elfs out there who could wave their magic wand or use their mojo and point this sado in the right direction
I have renamed the par fields to Par4txt, Par5txt etc and i will rename the orginals ls to Par1txt ,
Private Sub EmailerZ_Click()
Dim frm As Form
Const bq As String = "<blockquote>"
Const bqe As String = "</blockquote>"
Dim EmailApp As Object, NameSpace As Object, EmailSend As Object
Set EmailApp = CreateObject("Outlook.Application")
Set NameSpace = EmailApp.GetNamespace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)
Set frm = Forms!quotefrm
With frm
EmailSend.To = !
EmailSend.Subject = " Our Reference :-" & " " & ![Quoteno] & " - " & "(" & ![Insured] & ")"
EmailSend.HTMLBody = _
"<p>" & "For the Attention of :-" & ![POC] & " </p>" _
& vbCrLf & vbCrLf _
& "Insured :-" & ![Insured] & " </br>" _
& "Event :-" & ![Eventname] & " </br>" _
& "Dates :-" & ![openfrom] & " To " & ![opento] & " </br>" _
& "Venue :-" & ![venuename] & " </br>" _
& "<h1>" & ![Text184] & "</h1>" _
& bq & bq & "<b>" & ![BoldP1] & "</B>" & bqe & bqe _
& bq & bq & ![Text151] & bqe & bqe _
& bq & bq & "<b>" & ![BoldP2] & "</B>" & bqe & bqe _
& bq & bq & ![Text155] & bqe & bqe _
& bq & bq & "<b>" & ![BoldP3] & "</B>" & bqe & bqe _
& bq & bq & ![Text157] & bqe & bqe _
& vbCrLf & vbCrLf _
& ![AccounthandName] & "</br>" _
& ![Accounthandtitle] & "</br>" _
& ![AccEmail] & "</br>" _
& ![accTel] & "</br>" _
& ![AccFax] & "</br>" _
& "<p>" & ![Webaddz] & " </p>" _
& "<br/>" _
& "<p>" & ![AccountHandsignoff1] & "</p>" _
& "<p>" & ![accountHandsignoff2] & "</p>" _
& "<font size=""2"">" & ![accountHandsignoff8] & "</font>"
End With
below is the code so far (works a dream at work - slightly cocked up at home )
Now I like this little beast so I thought I would add a few more sections to it
like a heading on each paragrapgh (BoldP1) BoldP2.....
so 3 pargrapghs and 3 headings -- end effect - I is liking a LOT.. so I thinks to my self I'll add a few more (8 in total )
then code bitches at me too many lines ? - any way around this little problem
are there any little Access elfs out there who could wave their magic wand or use their mojo and point this sado in the right direction
I have renamed the par fields to Par4txt, Par5txt etc and i will rename the orginals ls to Par1txt ,
Private Sub EmailerZ_Click()
Dim frm As Form
Const bq As String = "<blockquote>"
Const bqe As String = "</blockquote>"
Dim EmailApp As Object, NameSpace As Object, EmailSend As Object
Set EmailApp = CreateObject("Outlook.Application")
Set NameSpace = EmailApp.GetNamespace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)
Set frm = Forms!quotefrm
With frm
EmailSend.To = !
EmailSend.Subject = " Our Reference :-" & " " & ![Quoteno] & " - " & "(" & ![Insured] & ")"
EmailSend.HTMLBody = _
"<p>" & "For the Attention of :-" & ![POC] & " </p>" _
& vbCrLf & vbCrLf _
& "Insured :-" & ![Insured] & " </br>" _
& "Event :-" & ![Eventname] & " </br>" _
& "Dates :-" & ![openfrom] & " To " & ![opento] & " </br>" _
& "Venue :-" & ![venuename] & " </br>" _
& "<h1>" & ![Text184] & "</h1>" _
& bq & bq & "<b>" & ![BoldP1] & "</B>" & bqe & bqe _
& bq & bq & ![Text151] & bqe & bqe _
& bq & bq & "<b>" & ![BoldP2] & "</B>" & bqe & bqe _
& bq & bq & ![Text155] & bqe & bqe _
& bq & bq & "<b>" & ![BoldP3] & "</B>" & bqe & bqe _
& bq & bq & ![Text157] & bqe & bqe _
& vbCrLf & vbCrLf _
& ![AccounthandName] & "</br>" _
& ![Accounthandtitle] & "</br>" _
& ![AccEmail] & "</br>" _
& ![accTel] & "</br>" _
& ![AccFax] & "</br>" _
& "<p>" & ![Webaddz] & " </p>" _
& "<br/>" _
& "<p>" & ![AccountHandsignoff1] & "</p>" _
& "<p>" & ![accountHandsignoff2] & "</p>" _
& "<font size=""2"">" & ![accountHandsignoff8] & "</font>"
End With