I have form with many labels and textbox. All these generates a report .
I want to print it out in MS Word format and also set print privew.
Here is my code for print for single textbox but i don't print in MS word.
So what to do?
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
PrintPreviewDialog1.ShowDialog()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim font1 As New Font("arial", 11, FontStyle.Regular)
e.Graphics.DrawString(IDtxt.Text, font1, Brushes.Black, 100, 100)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
PrintDocument1.Print()
End Sub