Have you tried using DoCmd.TransferText rather than your own vba?
Code:
Sub expLongText() DoCmd.TransferText acExportDelim, , "Query59LongText", "c:\users\jack\documents\SampleCSVLOngText.csv", True Debug.Print "all done " & NoW() End Sub
I just successfully tested the creation of a csv using a query of a table containing LongText. I selected those records whose prdct_desc was greater than 1200 and less than 3000 characters.
This is SQL for Query59LongText
Code:
SELECT tbl_Spl_LCL_Std_EstProdDescEng.Est_Name
, tbl_Spl_LCL_Std_EstProdDescEng.ESTBLMT_NO
, Len([PRDCT_DESC]) AS Expr1
, tbl_Spl_LCL_Std_EstProdDescEng.PRDCT_DESC
FROM tbl_Spl_LCL_Std_EstProdDescEng
WHERE (((Len([PRDCT_DESC]))>1200 And (Len([PRDCT_DESC]))<3000));