- Home
·
- String Manipulation
·
- This is a simple routine to print a long text string splitting it in short text lines starting in
This is a simple routine to print a long text string splitting it in short text lines starting in
This is a simple routine to print a long text string splitting it in short text lines starting in "X" position. It is useful when you have a
Rate This is a simple routine to print a long text string splitting it in short text lines starting in
(1(1 Vote))
'text lines starting in "X" position
'
'It is useful when you have a multi-line text box and need to print
'it's content within a limited area on a paper form.
'
'The easyest way is looking for line advance character [Chr(10)] but
'you can use any character you wish.
'Public declarations
Dim LongText as String, ShortLine as String
Public Sub PrintLongText(LongText As String)
Do While InStr(1, LongText, Chr(10), 0)
Pos = InStr(1, LongText, Chr(10), 0)
ShortLine = Left(LongText, Pos)
LongText = Right(LongText, Len(LongText) - Pos)
Printer.Print Tab(X); ShortLine;
Loop
Printer.Print Tab(X); LongText
End Sub
'Call the routine
PrintLongText TexBox.text
This is a simple routine to print a long text string splitting it in short text lines starting in Comments
No comments yet — be the first to post one!
Post a Comment