openoffice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johnny Rosenberg <gurus.knu...@gmail.com>
Subject Basic Macro – write a file
Date Fri, 22 Nov 2013 23:41:56 GMT
Dim iNumber As Integer
iNumber = Freefile
Open sFilePath For Output As #iNumber
Print #iNumber, "Line 1"
Print #iNumber, "Line 2"
Close #iNumber


The file now looks like this (in hex values):
4C 69 6E 65 20 31 0A
4C 69 6E 65 20 32 0A

So every line ends with 0A (Chr(10)).
The file is going to be in a special text file format suited for a specific
app, so I need every line to end with 0D 0A (Chr(13) & Chr(10)). Is that
possible? How? Can I see a short example of that, that creates a text file
that looks like the following?
4C 69 6E 65 20 31 0D 0A
4C 69 6E 65 20 32 0D 0A



Regards

Johnny Rosenberg

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message