Export Body to txt file without word wrap

I have an agent that exports the Body of an email to a txt file. The lines in the Body are over 80 characters wide. My code works fine, but in the resulting txt file, the lines wrap at 80 characters. I’d like for the line to keep it’s formatting from the Body to the txt file.

Sample line from txt file:

[15/May/2005:10:45:01 -0400] conn=1090772 op=0 msgId=1 - BIND dn=“” method=128 version=3

My code:

Sub Initialize

Dim FileLocation As String 

Dim FileName As String

Dim FileNum As Integer 

Dim Session As New notessession

Dim db As notesdatabase

Dim view As notesview

Dim Doc As Notesdocument



FileLocation="c:\temp\"



Set db = session.currentdatabase

Set dc = db.UnprocessedDocuments



For h = 1 To dc.count

	Set doc = dc.GetNthDocument(h)

	FileNum=Freefile

	FileName=FileLocation + "test.txt"

	Open FileName For Output As FileNum

	Print #fileNum, Doc.body

	Close FileNum 

	Sleep(1)

Next

Exit Sub

End Sub

Any ideas? BTW, I’ve tried using the Width parameter without success.

Subject: RE: Export Body to txt file without word wrap

Read about GetFormattedText method in the Designer help.

Subject: Export Body to txt file without word wrap

Any luck in getting just one character from the body field at a time and writing it to the file?

  • Johan

johan@kanngard.net

http://dev.kanngard.net