I would like to automatically print a text file from within a button event, and also, I would like to append that text file, which is being copied from my C:\. Can anyone help My code is below. The text file I would like to print automatically and append is (test1.txt).
Private
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim file As System.IO.StreamWriter Dim CombineString As StringCombineString = aString & bString & cString & dString & eString & fString & hString & kString & iString & jString & lString
file = My.Computer.FileSystem.OpenTextFileWriter("C:\test.txt", True, System.Text.Encoding.ASCII)
file.WriteLine(CombineString)
file.Close()
My.Computer.FileSystem.CopyFile("C:\test.txt", _
"C:\SaveDocs\test1.txt"
, Microsoft.VisualBasic.FileIO.UIOption.OnlyErrorDialogs, FileIO.UICancelOption.DoNothing)End Sub

Print automation in vb.net
Eby
take a look at this in terms of printing:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=796856&SiteID=1
http://msdn2.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx
in terms of appending to a textfile...try the FileSystem.WriteAllText and set the append parameter to true
my.computer.filesystem.writealltext("C:\myfile.txt", "mystring", true)
http://msdn2.microsoft.com/en-us/library/27t17sxs.aspx