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
Re: Connecting MS word to print a form in vb.net 80 80

sorry but this link is not opening.
Can u pl tell me another link

Re: Connecting MS word to print a form in vb.net 80 80

Create your report as a Word document using "Microsoft Word Object Library" (Microsoft.Office.Interop.Word).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.