If you meant , let me know and I’ll show you how to use Microsoft.Office.Interop.Word or a PDF library with VB Express.
Private Sub PrintDocument1_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim textToPrint As String = My.Computer.FileSystem.ReadAllText("C:\temp\MyPaper.txt") e.Graphics.DrawString(textToPrint, New Font("Arial", 12), Brushes.Black, 100, 100) End Sub End Class visual basic express
Let me know your specific goal so I can tailor the answer. If you meant , let me know and
' Optional: Print directly PrintDocument1.DocumentName = "MyPaper" PrintDocument1.Print() End Sub If you meant
' Save to a file My.Computer.FileSystem.WriteAllText("C:\temp\MyPaper.txt", paper, False)