Forum Discussion

Juan_Palma's avatar
Juan_Palma
Copper Contributor
Nov 23, 2023

remove line break when exporting to txt file

I am working with access 2016, I have created a report with a single line and 4100 characters/columns.
The file in the report is correct, if I copy the report data and paste it in a txt, the program where it is directed recognizes it well.
Now if I tell the report to convert it directly to txt, it creates the file but it makes line breaks and backspace of expensive. and I do not know how I can do so that when exporting it, it respects the width and characters.

I would appreciate your help,

  • Presumably the report is based on a table, and that table has a Long Text field with 4100 characters. Is that correct?
    If so, you can use DoCmd.TransferText to export directly from the table. No report needed or wanted.
    • Juan_Palma's avatar
      Juan_Palma
      Copper Contributor
      thank you for your reply

      could you tell me how to write the code of a table called table1 and the field where it is stored is called document.
      I would appreciate it very much
  • arnel_gp's avatar
    arnel_gp
    Steel Contributor

    Juan_Palma, you can't expect that all "text formatting" will be exported to a "plain" text file.

    import it as an html or a richtext.

    • Juan_Palma's avatar
      Juan_Palma
      Copper Contributor
      hank you for your reply

      could you tell me how to write the code of a table called table1 and the field where it is stored is called document.
      I would appreciate it very much

Resources