WrapText()
Use this method to wrap a piece of text to lines of a specific maximum length.
Syntax
Function WrapText(ByVal textToWrap As String, Optional ByVal
charsPerLine As Long) As String
Parameters
| Parameter | Description |
|---|---|
textToWrap | The text you want to apply wrapping to. |
charsPerLine | Optional: The number of characters to wrap this piece of text to (defaults to what SetLineWidth() has set, or else to 72). |
Description
The method determines the length as follows:
- If the method itself has its
charsPerLineparameter set, it uses that length. - If there is no second parameter, and if a call to
SetLineWidth()has been made earlier, it uses that length. - If there is no second parameter and no call to
SetLineWidth()was made earlier, it uses a default length of 72.