Re: Formating a string to fit the page
- From: Tom van Stiphout <no.spam.tom7744@xxxxxxx>
- Date: Sat, 19 Jul 2008 09:57:42 -0700
On Fri, 18 Jul 2008 08:02:05 -0700, Igor
<Igor@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
If I understand you correctly you need a function like this:
Function WrapText(ByVal strText As String, ByVal intLength As Integer)
As String
Dim i As Integer
Dim strResult As String
For i = 0 To Len(strText) / intLength - 1
strResult = strResult & Mid$(strText, i * intLength + 1,
intLength) & vbCrLf
Next i
WrapText = strResult
End Function
?wraptext("abcdefghijklmnopqrstuvwxyz",10)
abcdefghij
klmnopqrst
uvwxyz
-Tom.
Microsoft Access MVP
Hi can anyone help with formating a string. I am sending one continius string.
to the third party software from VBA Third party sofware can does not format
my string to fit the page basicaly it drops everything after certain number
of charachter E.G 125 characters. I can have a long string that is 500-600
charachters does anyone have any functions that would format my string
properly to have 125 charecters on one line and then put CTRLF and continue
printing .
Thanks in advance,
Igor
- Prev by Date: Re: Backup in Ms Access
- Next by Date: Re: Writing to position x, y in a text file
- Previous by thread: Re: System Tray
- Next by thread: copy structure only
- Index(es):
Relevant Pages
|