export memo excel in a spreadsheet via mail

M

marcello

Hi

I use the following module to export result of a query in a spreadsheet
attached to a mail, and add a template.

Option Compare Database
Option Explicit

Function sendmailrate()
Dim vnumber As Integer
Dim db As DAO.Database
Dim paramset As DAO.Recordset
Dim vto As String
Dim vtexte As String
Dim vsub As String
Dim vdate As Date

Set db = CurrentDb()
Set paramset = db.OpenRecordset("template_rate")
vto = Mid(DMax("[catemail]", "a_c_queries_dmax"), 5, 150)
vtexte = paramset![template]
vsub = "urgent : requested coupon advices"
DoCmd.SendObject acSendQuery, "a_c_queries_xls", acFormatHTML, vto, , ,
vsub, vtexte, False

End Function

But the problem is when the text in the memo is longer than 255 caracters,
it's cut and I lost important information. How could I modify my code to keep
all text in my memo field.

Many thanks in advance
op576
 
Top