<-- Previous || Up || Next -->

Wrap Text Function
Formats Justifies Class

Public Function WrapText( _
      ByVal vParagraphs As Variant _
    , ByVal vMaxWidth As Variant _
    , Optional ByVal vJustifyCodes As Variant _
    , Optional ByVal vSeparator As Variant _
    ) As Variant

Wrap the lines of text within each paragraph so that each line is no longer that the specified maximum width.

Top20: This function is among our "top-twenty" most useful.
    ? WrapText(Preamble, 40)
    We the people of the United States, in
    order to form a more perfect union,
    establish justice, insure domestic
    tranquility, provide for the common
    defense, promote the general welfare,
    and secure the blessing of liberty to
    ourselves and our posterity, do ordain
    and establish the Constitution of the
    United States of America.
See also:
    JustifyText Function
    WrapBlocks Function
    AddCrLfEveryNCharacters Function
    OffsetTextBlock Function
    UnformatLine Function
vParagraphs: String containing one or more paragraphs of text whose lines should be wrapped so that they fit within some maximum line length. The individual paragraphs of text in string vParagraphs can be separated by either line feed or carriage return line feed strings. Function returns Null if vParagraphs is Null or cannot be fixed up to a String.

vMaxWidth: The maximum width of the lines in the result string. Function returns Null if vMaxWidth is Null or cannot be fixed up to a number.

vJustifyCodes: Any meaningful combination of the formatting codes available through the Justify properties of this Class. Defaults an empty string (the absence of any specific formatting codes) if vJustifyCodes is missing or Null or cannot be fixed up to a String.

vSeparator: The string which will separate the lines of text in the result string. vSeparator defaults to carriage return and new line characters if it is missing or Null or cannot be fixed up to a String.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.