Let me know your specific goal so I can tailor the answer.

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

' Optional: Print directly PrintDocument1.DocumentName = "MyPaper" PrintDocument1.Print() End Sub

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.

' Save to a file My.Computer.FileSystem.WriteAllText("C:\temp\MyPaper.txt", paper, False)

Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click ' Simulate producing a paper Dim title As String = "My Sample Paper" Dim author As String = "Student Name" Dim body As String = "This is the content of the paper. " & "It discusses important topics and concludes with findings." ' Combine into a document Dim paper As String = "Title: " & title & vbCrLf & "Author: " & author & vbCrLf & "Date: " & Date.Now.ToString() & vbCrLf & vbCrLf & body & vbCrLf & vbCrLf & "--- End of Paper ---"

90% OFF