I have got my text file sorted into 5 columns and it looks good
using this code
When i print the file using the file > print from the notepad program the columns do not appear as they do on the screen..Code:Dim sw As New IO.StreamWriter("C:\StickFrameExpress\Jobs\" & Me.lblJobNumber.Text & ".txt", False) 'write blanks lines sw.WriteLine("") sw.WriteLine("") 'write job number and date sw.WriteLine(ControlChars.Tab & "Job Number:" & " " & Me.lblJobNumber.Text & " " & Now) sw.WriteLine("") sw.WriteLine("") sw.WriteLine("") 'header sw.WriteLine(ControlChars.Tab & "Name".PadRight(20, " "c) & _ ControlChars.Tab & "Material".PadRight(50, " "c) & _ ControlChars.Tab & "Length".PadRight(15, " "c) & _ ControlChars.Tab & "Qty".PadRight(8, " "c) & _ ControlChars.Tab & "Units".PadRight(8, " "c)) sw.WriteLine("") Dim i As Int16 With Me.ListView1 For i = 0 To CShort(.Items.Count - 1) If .Items(i).Text <> "" Then sw.WriteLine(ControlChars.Tab & .Items(i).Text.PadRight(20, " "c) & _ ControlChars.Tab & .Items(i).SubItems(1).Text.PadRight(50, " "c) & _ ControlChars.Tab & .Items(i).SubItems(2).Text.PadRight(15, " "c) & _ ControlChars.Tab & .Items(i).SubItems(3).Text.PadRight(8, " "c) & _ ControlChars.Tab & .Items(i).SubItems(4).Text.PadRight(8, " "c)) sw.writeLine("")
They no longer line up.
How can i overcome this?
regards
toe





Reply With Quote