WrapText()

Syntax

Function WrapText(ByVal textToWrap As String, Optional ByVal
charsPerLine As Long) As String

Parameters

ParameterDescription
textToWrapThe text you want to apply wrapping to.
charsPerLineOptional: The number of characters to wrap this piece of text to (defaults to what SetLineWidth() has set, or else to 72).

Description

This method wraps a piece of text to lines of a specific maximum length. It determines the length as follows:

  • If the method itself has its charsPerLine parameter 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.