Hi All,
ive searched the forums but nothing which meets what i need, i have some code which creates a HTML email from button click using fields within my db, the problem being i need the email to be quite long and VBA is not letting write more than 25 lines on an email using the _ and i have approximately 42 lines of html email, can any of you help me with any ideas on this? i need the email to be formatted and styled and spaces between certain text using vbNewLine and my signature at the bottom.
I'm also going to be attaching a document (test document at moment)
could i possibly extract the data from a word document that has the formatting i would like the email to look like? any help on this would be appreciated.
the code i'm using right now:
ive searched the forums but nothing which meets what i need, i have some code which creates a HTML email from button click using fields within my db, the problem being i need the email to be quite long and VBA is not letting write more than 25 lines on an email using the _ and i have approximately 42 lines of html email, can any of you help me with any ideas on this? i need the email to be formatted and styled and spaces between certain text using vbNewLine and my signature at the bottom.
I'm also going to be attaching a document (test document at moment)
could i possibly extract the data from a word document that has the formatting i would like the email to look like? any help on this would be appreciated.
the code i'm using right now:
Private Sub Command41_Click()
Dim OApp As Object, OMail As Object, signature As String
strBody = "<br>Please ensure that the details below are correct.<br>" & vbCrLf
Set OApp = CreateObject("Outlook.Application")
Set OMail = OApp.CreateItem(0)
With OMail
.Display
End With
signature = OMail.HTMLBody
With OMail
.To = EmailAddress
.Subject = "Reference: " & Me![productssubform].Form![Ref]
.Attachments.Add ("C:\Proj\Test.txt")
.HTMLBody = strBody & vbNewLine & signature
'.Send
End With
Set OMail = Nothing
Set OApp = Nothing
End Sub