Private Sub WrapFileLinesSample()
Const strFn = "WrapFileLinesSample"
Dim strInFile As String
strInFile = CombinePathAndFile(GetWindowsDirectory, "WIN.INI")
strInFile = InputBox("Input file: ({Esc} cancels.)", strFn, strInFile)
If Len(strInFile) = 0 Then Exit Sub
Dim strOutFile As String
strOutFile = GetTempFileName(Null, strFn)
strOutFile = InputBox("Output file: (FILE WILL BE OVERWRITTEN; {Esc} cancels.)", strFn, strOutFile)
If Len(strOutFile) = 0 Then Exit Sub
Dim strMaxWidth As String
strMaxWidth = InputBox("Maximum line width: ({Esc} cancels.)", strFn, "78")
If Len(strMaxWidth) = 0 Then Exit Sub
MsgBox "Return = " & WrapFileLines(strInFile, strOutFile, strMaxWidth) & " (True means success; False means failure.)", vbInformation, strFn
End SubCopyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.