Zum Hauptinhalt gehen

Suche

Suche

adding new lines of text in javascript output

Kommentare

2 Kommentare

  • Avatar
    mari zeng

    Sorry to revive an old thread but did you ever find a solution to this? i am having the same problem.

    0
  • Avatar
    Tom Viguurs

    Hello Mari, check out the code below which i use for logging data to a text file. The named datafields 'Product', 'Content' and 'Batch' are written to an excisting text file when in my case the document is printed. (place this file into javascript section On New Record). Good luck!

     

    'Dim btFormat As BarTender.Format

    Set fs = CreateObject("Scripting.FileSystemObject")

    'open file in append mode (8)

    set objLog = fs.OpenTextFile("C:\YOURPATH\filename.txt", 8, true, 0)

    'write to file

    objLog.WriteLine (Product & vbTab & Content & vbTab & Batch)

    'close file

    objLog.close

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.