Loek
Registered User.
- Local time
- Today, 09:25
- Joined
- Feb 6, 2011
- Messages
- 14
Hi, everybody
I have a problem with an epson lx300 + dot matrix printer. The vba vbCrLf code doesn't work when I print text line by line. Have you ever experienced the same thing?
I use this code :
strLine as string
Dim lReturn As Long, lpcWritten As Long, sWrittenData As String
strLine ="one" & vbCrLf & _
"two" & vbCrLf & _
"some word"
sWrittenData = strLine & vbCrLf & vbCrLf
lReturn = WritePrinter(lhPrinter, ByVal sWrittenData, _
Len(sWrittenData), lpcWritten)
lReturn = EndPagePrinter(lhPrinter)
lReturn = EndDocPrinter(lhPrinter)
the result should be like this :
one
two
some word
But I get like this :
one-*two-*some word-*-*
I tried with vbNewLine but the results are still the same. I replaced it with Chr(13) & Chr(10), the results are still the same
I have a problem with an epson lx300 + dot matrix printer. The vba vbCrLf code doesn't work when I print text line by line. Have you ever experienced the same thing?
I use this code :
strLine as string
Dim lReturn As Long, lpcWritten As Long, sWrittenData As String
strLine ="one" & vbCrLf & _
"two" & vbCrLf & _
"some word"
sWrittenData = strLine & vbCrLf & vbCrLf
lReturn = WritePrinter(lhPrinter, ByVal sWrittenData, _
Len(sWrittenData), lpcWritten)
lReturn = EndPagePrinter(lhPrinter)
lReturn = EndDocPrinter(lhPrinter)
the result should be like this :
one
two
some word
But I get like this :
one-*two-*some word-*-*
I tried with vbNewLine but the results are still the same. I replaced it with Chr(13) & Chr(10), the results are still the same