save as word document with a pre chosen name?

russhockshop

New member
Joined
Apr 6, 2022
Messages
3
Programming Experience
Beginner
VB.NET:
Public Class Form1
    Inherits System.Windows.Forms.Form

    Public myCaller As Form4
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        lblDay.Text = Date.Now.ToString("dddd/MMMM/dd/yyyy")
        prntDoc.DefaultPageSettings.Landscape = True
    End Sub

    Private Sub PrintDocument1_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles prntDoc.PrintPage

        e.Graphics.DrawImage(PictureBox1.Image, -12, -23)
        e.Graphics.DrawString(lblName.Text, lblName.Font, Brushes.Black, 213, 302)
        e.Graphics.DrawString(tbxName.Text, tbxName.Font, Brushes.Black, 288, 302)
        e.Graphics.DrawString(lblAddress.Text, lblAddress.Font, Brushes.Black, 213, 327)
        e.Graphics.DrawString(txtAddress.Text, txtAddress.Font, Brushes.Black, 288, 327)
        e.Graphics.DrawString(lblDl.Text, lblDl.Font, Brushes.Black, 213, 352)
        e.Graphics.DrawString(txtDl.Text, txtDl.Font, Brushes.Black, 288, 352)
        e.Graphics.DrawString(cboxQual.Text, cboxQual.Font, Brushes.Black, 163, 377)
        e.Graphics.DrawString(lblDate.Text, lblDate.Font, Brushes.Black, 213, 402)
        e.Graphics.DrawString(lblDay.Text, lblDay.Font, Brushes.Black, 288, 402)
        If cbOnline.Checked Then e.Graphics.DrawString(lblAgency.Text, cboxAgency.Font, Brushes.Black, 213, 417) Else e.Graphics.DrawString(lblAgency.Text, lblAgency.Font, Brushes.Black, 213, 427)
        If cbOnline.Checked Then e.Graphics.DrawString(cboxAgency.Text, cboxAgency.Font, Brushes.Black, 288, 417) Else e.Graphics.DrawString(cboxAgency.Text, cboxAgency.Font, Brushes.Black, 288, 427)
        If cbOnline.Checked Then e.Graphics.DrawString(lblCert.Text, lblCert.Font, Brushes.Black, 213, 432)
        If cbOnline.Checked Then e.Graphics.DrawString(txtOnline.Text, txtOnline.Font, Brushes.Black, 310, 432)
        e.Graphics.DrawString(lblQualified.Text, lblQualified.Font, Brushes.Black, 213, 452)
        e.Graphics.DrawString(lblMake.Text, txtCaliber1.Font, Brushes.Black, 213, 467)
        e.Graphics.DrawString(lblSerial.Text, txtCaliber1.Font, Brushes.Black, 313, 467)
        e.Graphics.DrawString(lblModel.Text, lblModel.Font, Brushes.Black, 513, 467)
        e.Graphics.DrawString(lblCaliber.Text, lblCaliber.Font, Brushes.Black, 613, 467)
        e.Graphics.DrawString(lblInstructor.Text, lblInstructor.Font, Brushes.Black, 538, 712)
        e.Graphics.DrawString(cboxInstructors.Text, cboxInstructors.Font, Brushes.Black, 338, 712)

        If txtGun1.Text.ToString = ("GLOCK") Then e.Graphics.DrawString(lblGlockCal1.Text, lblGlockCal1.Font, Brushes.Black, 613, 492)
        If txtGun2.Text.ToString = ("GLOCK") Then e.Graphics.DrawString(lblGlockCal2.Text, lblGlockCal2.Font, Brushes.Black, 613, 507)
        If txtGun3.Text.ToString = ("GLOCK") Then e.Graphics.DrawString(lblGlockCal3.Text, lblGlockCal3.Font, Brushes.Black, 613, 522)
        If txtGun4.Text.ToString = ("GLOCK") Then e.Graphics.DrawString(lblGlockCal4.Text, lblGlockCal4.Font, Brushes.Black, 613, 537)
        If Form4.txtGun5.Text.ToString = ("GLOCK") Then e.Graphics.DrawString(Form4.lblGlock5.Text, Form4.lblGlock5.Font, Brushes.Black, 613, 552)
        If Form4.txtGun6.Text.ToString = ("GLOCK") Then e.Graphics.DrawString(Form4.lblGlock6.Text, Form4.lblGlock6.Font, Brushes.Black, 613, 567)
        If Form4.txtGun7.Text.ToString = ("GLOCK") Then e.Graphics.DrawString(Form4.lblGlock7.Text, Form4.lblGlock7.Font, Brushes.Black, 613, 582)
        If Form4.txtGun8.Text.ToString = ("GLOCK") Then e.Graphics.DrawString(Form4.lblGlock8.Text, Form4.lblGlock8.Font, Brushes.Black, 613, 597)
        If Form4.txtGun9.Text.ToString = ("GLOCK") Then e.Graphics.DrawString(Form4.lblGlock9.Text, Form4.lblGlock9.Font, Brushes.Black, 613, 612)
        If Form4.txtGun10.Text.ToString = ("GLOCK") Then e.Graphics.DrawString(Form4.lblGlock10.Text, Form4.lblGlock10.Font, Brushes.Black, 613, 627)

        e.Graphics.DrawString(txtGun1.Text, txtGun1.Font, Brushes.Black, 213, 492)
        e.Graphics.DrawString(txtGun2.Text, txtGun2.Font, Brushes.Black, 213, 507)
        e.Graphics.DrawString(txtGun3.Text, txtGun3.Font, Brushes.Black, 213, 522)
        e.Graphics.DrawString(txtGun4.Text, txtGun4.Font, Brushes.Black, 213, 537)
        e.Graphics.DrawString(Form4.txtGun5.Text, Form4.txtGun5.Font, Brushes.Black, 213, 552)
        e.Graphics.DrawString(Form4.txtGun6.Text, Form4.txtGun6.Font, Brushes.Black, 213, 567)
        e.Graphics.DrawString(Form4.txtGun7.Text, Form4.txtGun7.Font, Brushes.Black, 213, 582)
        e.Graphics.DrawString(Form4.txtGun8.Text, Form4.txtGun8.Font, Brushes.Black, 213, 597)
        e.Graphics.DrawString(Form4.txtGun9.Text, Form4.txtGun9.Font, Brushes.Black, 213, 612)
        e.Graphics.DrawString(Form4.txtGun10.Text, Form4.txtGun10.Font, Brushes.Black, 213, 627)

        e.Graphics.DrawString(txtSerial1.Text, txtSerial1.Font, Brushes.Black, 313, 492)
        e.Graphics.DrawString(txtSerial2.Text, txtSerial2.Font, Brushes.Black, 313, 507)
        e.Graphics.DrawString(txtSerial3.Text, txtSerial3.Font, Brushes.Black, 313, 522)
        e.Graphics.DrawString(txtSerial4.Text, txtSerial4.Font, Brushes.Black, 313, 537)
        e.Graphics.DrawString(Form4.txtSerial5.Text, Form4.txtSerial5.Font, Brushes.Black, 313, 552)
        e.Graphics.DrawString(Form4.txtSerial6.Text, Form4.txtSerial6.Font, Brushes.Black, 313, 567)
        e.Graphics.DrawString(Form4.txtSerial7.Text, Form4.txtSerial7.Font, Brushes.Black, 313, 582)
        e.Graphics.DrawString(Form4.txtSerial8.Text, Form4.txtSerial8.Font, Brushes.Black, 313, 597)
        e.Graphics.DrawString(Form4.txtSerial9.Text, Form4.txtSerial9.Font, Brushes.Black, 313, 612)
        e.Graphics.DrawString(Form4.txtSerial10.Text, Form4.txtSerial10.Font, Brushes.Black, 313, 627)

        e.Graphics.DrawString(txtGlock1.Text, txtGlock1.Font, Brushes.Black, 513, 492)
        e.Graphics.DrawString(txtGlock2.Text, txtGlock2.Font, Brushes.Black, 513, 507)
        e.Graphics.DrawString(txtGlock3.Text, txtGlock3.Font, Brushes.Black, 513, 522)
        e.Graphics.DrawString(txtGlock4.Text, txtGlock4.Font, Brushes.Black, 513, 537)
        e.Graphics.DrawString(Form4.txtGlock5.Text, Form4.txtGlock5.Font, Brushes.Black, 513, 552)
        e.Graphics.DrawString(Form4.txtGlock6.Text, Form4.txtGlock6.Font, Brushes.Black, 513, 567)
        e.Graphics.DrawString(Form4.txtGlock7.Text, Form4.txtGlock7.Font, Brushes.Black, 513, 582)
        e.Graphics.DrawString(Form4.txtGlock8.Text, Form4.txtGlock8.Font, Brushes.Black, 513, 597)
        e.Graphics.DrawString(Form4.txtGlock9.Text, Form4.txtGlock9.Font, Brushes.Black, 513, 612)
        e.Graphics.DrawString(Form4.txtGlock10.Text, Form4.txtGlock10.Font, Brushes.Black, 513, 627)

        e.Graphics.DrawString(txtModel1.Text, txtModel1.Font, Brushes.Black, 513, 492)
        e.Graphics.DrawString(txtModel2.Text, txtModel2.Font, Brushes.Black, 513, 507)
        e.Graphics.DrawString(txtModel3.Text, txtModel3.Font, Brushes.Black, 513, 522)
        e.Graphics.DrawString(txtModel4.Text, txtModel4.Font, Brushes.Black, 513, 537)
        e.Graphics.DrawString(Form4.txtModel5.Text, Form4.txtModel5.Font, Brushes.Black, 513, 552)
        e.Graphics.DrawString(Form4.txtModel6.Text, Form4.txtModel6.Font, Brushes.Black, 513, 567)
        e.Graphics.DrawString(Form4.txtModel7.Text, Form4.txtModel7.Font, Brushes.Black, 513, 582)
        e.Graphics.DrawString(Form4.txtModel8.Text, Form4.txtModel8.Font, Brushes.Black, 513, 597)
        e.Graphics.DrawString(Form4.txtModel9.Text, Form4.txtModel9.Font, Brushes.Black, 513, 612)
        e.Graphics.DrawString(Form4.txtModel10.Text, Form4.txtModel10.Font, Brushes.Black, 513, 627)

        e.Graphics.DrawString(txtCaliber1.Text, txtCaliber1.Font, Brushes.Black, 613, 492)
        e.Graphics.DrawString(txtCaliber2.Text, txtCaliber2.Font, Brushes.Black, 613, 507)
        e.Graphics.DrawString(txtCaliber3.Text, txtCaliber3.Font, Brushes.Black, 613, 522)
        e.Graphics.DrawString(txtCaliber4.Text, txtCaliber4.Font, Brushes.Black, 613, 537)
        e.Graphics.DrawString(Form4.txtCaliber5.Text, Form4.txtCaliber5.Font, Brushes.Black, 613, 552)
        e.Graphics.DrawString(Form4.txtCaliber6.Text, Form4.txtCaliber6.Font, Brushes.Black, 613, 567)
        e.Graphics.DrawString(Form4.txtCaliber7.Text, Form4.txtCaliber7.Font, Brushes.Black, 613, 582)
        e.Graphics.DrawString(Form4.txtCaliber8.Text, Form4.txtCaliber8.Font, Brushes.Black, 613, 597)
        e.Graphics.DrawString(Form4.txtCaliber9.Text, Form4.txtCaliber9.Font, Brushes.Black, 613, 612)
        e.Graphics.DrawString(Form4.txtCaliber10.Text, Form4.txtCaliber10.Font, Brushes.Black, 613, 627)

    End Sub


    Private Sub txtGun1_TextChanged(sender As Object, e As EventArgs) Handles txtGun1.TextChanged
        If txtGun1.Text.ToString = ("GLOCK") Then txtGlock1.Visible = True
        If txtGun1.Text.ToString = ("GLOCK") Then txtModel1.Visible = False
        If txtGun1.Text = ("") Then txtGlock1.Visible = False
        If txtGun1.Text = ("") Then txtModel1.Visible = True
        If txtGun1.Text.ToString = ("GLOCK") Then lblGlockCal1.Visible = True
        If txtGun1.Text.ToString = ("GLOCK") Then txtCaliber1.Visible = False
        If txtGun1.Text = ("") Then lblGlockCal1.Visible = False
        If txtGun1.Text = ("") Then txtCaliber1.Visible = True
    End Sub

    Private Sub txtModel1_TextChanged(sender As Object, e As EventArgs) Handles txtModel1.TextChanged

    End Sub

    Private Sub lblGlockCal1_Click(sender As Object, e As EventArgs) Handles lblGlockCal1.Click
        If txtGlock1.Text.ToString = ("19") Then lblGlockCal1.Text = ("9mm")


    End Sub

    Private Sub txtGlock1_TextChanged(sender As Object, e As EventArgs) Handles txtGlock1.TextChanged
        If txtGlock1.Text = ("17") Or txtGlock1.Text.ToString = ("17L") Then lblGlockCal1.Text = ("9MM")
        If txtGlock1.Text = ("19") Then lblGlockCal1.Text = ("9MM")
        If txtGlock1.Text = ("26") Then lblGlockCal1.Text = ("9MM")
        If txtGlock1.Text = ("34") Then lblGlockCal1.Text = ("9MM")
        If txtGlock1.Text = ("43") Then lblGlockCal1.Text = ("9MM")
        If txtGlock1.Text.ToString = ("43X") Then lblGlockCal1.Text = ("9MM")
        If txtGlock1.Text = ("45") Then lblGlockCal1.Text = ("9MM")
        If txtGlock1.Text = ("48") Then lblGlockCal1.Text = ("9MM")
        If txtGlock1.Text = ("44") Then lblGlockCal1.Text = (".22LR")
        If txtGlock1.Text = ("22") Then lblGlockCal1.Text = (".40 S&W")
        If txtGlock1.Text = ("23") Then lblGlockCal1.Text = (".40 S&W")
        If txtGlock1.Text = ("24") Then lblGlockCal1.Text = (".40 S&W")
        If txtGlock1.Text = ("27") Then lblGlockCal1.Text = (".40 S&W")
        If txtGlock1.Text = ("35") Then lblGlockCal1.Text = (".40 S&W")
        If txtGlock1.Text = ("20") Or txtGlock1.Text.ToString = ("20SF") Then lblGlockCal1.Text = ("10MM")
        If txtGlock1.Text = ("29") Or txtGlock1.Text.ToString = ("29SF") Then lblGlockCal1.Text = ("10MM")
        If txtGlock1.Text = ("40") Then lblGlockCal1.Text = ("10MM")
        If txtGlock1.Text = ("21") Or txtGlock1.Text.ToString = ("21SF") Then lblGlockCal1.Text = (".45 AUTO")
        If txtGlock1.Text = ("30") Or txtGlock1.Text.ToString = ("30S") Or txtGlock1.Text.ToString = ("30SF") Then lblGlockCal1.Text = (".45 AUTO")
        If txtGlock1.Text = ("36") Then lblGlockCal1.Text = (".45 AUTO")
        If txtGlock1.Text = ("41") Then lblGlockCal1.Text = (".45 AUTO")
        If txtGlock1.Text = ("37") Or txtGlock1.Text = ("38") Or txtGlock1.Text = ("39") Then lblGlockCal1.Text = (".45 G.A.P.")
        If txtGlock1.Text = ("42") Then lblGlockCal1.Text = (".380ACP")
        If txtGlock1.Text = ("31") Then lblGlockCal1.Text = (".357 SIG")
        If txtGlock1.Text = ("32") Then lblGlockCal1.Text = (".357 SIG")
        If txtGlock1.Text = ("33") Then lblGlockCal1.Text = (".357 SIG")
    End Sub

    Private Sub txtGun2_TextChanged(sender As Object, e As EventArgs) Handles txtGun2.TextChanged
        If txtGun2.Text.ToString = ("GLOCK") Then txtGlock2.Visible = True
        If txtGun2.Text.ToString = ("GLOCK") Then txtModel2.Visible = False
        If txtGun2.Text = ("") Then txtGlock2.Visible = False
        If txtGun2.Text = ("") Then txtModel2.Visible = True
        If txtGun2.Text.ToString = ("GLOCK") Then lblGlockCal2.Visible = True
        If txtGun2.Text.ToString = ("GLOCK") Then txtCaliber2.Visible = False
        If txtGun2.Text = ("") Then lblGlockCal2.Visible = False
        If txtGun2.Text = ("") Then txtCaliber2.Visible = True
    End Sub

    Private Sub txtGlock2_TextChanged(sender As Object, e As EventArgs) Handles txtGlock2.TextChanged
        If txtGlock2.Text = ("17") Or txtGlock2.Text.ToString = ("17L") Then lblGlockCal2.Text = ("9MM")
        If txtGlock2.Text = ("19") Then lblGlockCal2.Text = ("9MM")
        If txtGlock2.Text = ("26") Then lblGlockCal2.Text = ("9MM")
        If txtGlock2.Text = ("34") Then lblGlockCal2.Text = ("9MM")
        If txtGlock2.Text = ("43") Then lblGlockCal2.Text = ("9MM")
        If txtGlock2.Text.ToString = ("43X") Then lblGlockCal2.Text = ("9MM")
        If txtGlock2.Text = ("45") Then lblGlockCal2.Text = ("9MM")
        If txtGlock2.Text = ("48") Then lblGlockCal2.Text = ("9MM")
        If txtGlock2.Text = ("44") Then lblGlockCal2.Text = (".22LR")
        If txtGlock2.Text = ("22") Then lblGlockCal2.Text = (".40 S&W")
        If txtGlock2.Text = ("23") Then lblGlockCal2.Text = (".40 S&W")
        If txtGlock2.Text = ("24") Then lblGlockCal2.Text = (".40 S&W")
        If txtGlock2.Text = ("27") Then lblGlockCal2.Text = (".40 S&W")
        If txtGlock2.Text = ("35") Then lblGlockCal2.Text = (".40 S&W")
        If txtGlock2.Text = ("20") Or txtGlock2.Text.ToString = ("20SF") Then lblGlockCal2.Text = ("10MM")
        If txtGlock2.Text = ("29") Or txtGlock2.Text.ToString = ("29SF") Then lblGlockCal2.Text = ("10MM")
        If txtGlock2.Text = ("40") Then lblGlockCal2.Text = ("10MM")
        If txtGlock2.Text = ("21") Or txtGlock2.Text.ToString = ("21SF") Then lblGlockCal2.Text = (".45 AUTO")
        If txtGlock2.Text = ("30") Or txtGlock2.Text.ToString = ("30S") Or txtGlock2.Text.ToString = ("30SF") Then lblGlockCal2.Text = (".45 AUTO")
        If txtGlock2.Text = ("36") Then lblGlockCal2.Text = (".45 AUTO")
        If txtGlock2.Text = ("41") Then lblGlockCal2.Text = (".45 AUTO")
        If txtGlock2.Text = ("37") Or txtGlock2.Text = ("38") Or txtGlock2.Text = ("39") Then lblGlockCal2.Text = (".45 G.A.P.")
        If txtGlock2.Text = ("42") Then lblGlockCal2.Text = (".380ACP")
        If txtGlock2.Text = ("31") Then lblGlockCal2.Text = (".357 SIG")
        If txtGlock2.Text = ("32") Then lblGlockCal2.Text = (".357 SIG")
        If txtGlock2.Text = ("33") Then lblGlockCal2.Text = (".357 SIG")
    End Sub

    Private Sub txtGun3_TextChanged(sender As Object, e As EventArgs) Handles txtGun3.TextChanged
        If txtGun3.Text.ToString = ("GLOCK") Then txtGlock3.Visible = True
        If txtGun3.Text.ToString = ("GLOCK") Then txtModel3.Visible = False
        If txtGun3.Text = ("") Then txtGlock3.Visible = False
        If txtGun3.Text = ("") Then txtModel3.Visible = True
        If txtGun3.Text.ToString = ("GLOCK") Then lblGlockCal3.Visible = True
        If txtGun3.Text.ToString = ("GLOCK") Then txtCaliber3.Visible = False
        If txtGun3.Text = ("") Then lblGlockCal3.Visible = False
        If txtGun3.Text = ("") Then txtCaliber3.Visible = True
    End Sub

    Private Sub txtGlock3_TextChanged(sender As Object, e As EventArgs) Handles txtGlock3.TextChanged
        If txtGlock3.Text = ("17") Or txtGlock3.Text.ToString = ("17L") Then lblGlockCal3.Text = ("9MM")
        If txtGlock3.Text = ("19") Then lblGlockCal3.Text = ("9MM")
        If txtGlock3.Text = ("26") Then lblGlockCal3.Text = ("9MM")
        If txtGlock3.Text = ("34") Then lblGlockCal3.Text = ("9MM")
        If txtGlock3.Text = ("43") Then lblGlockCal3.Text = ("9MM")
        If txtGlock3.Text.ToString = ("43X") Then lblGlockCal3.Text = ("9MM")
        If txtGlock3.Text = ("45") Then lblGlockCal3.Text = ("9MM")
        If txtGlock3.Text = ("48") Then lblGlockCal3.Text = ("9MM")
        If txtGlock3.Text = ("44") Then lblGlockCal3.Text = (".22LR")
        If txtGlock3.Text = ("22") Then lblGlockCal3.Text = (".40 S&W")
        If txtGlock3.Text = ("23") Then lblGlockCal3.Text = (".40 S&W")
        If txtGlock3.Text = ("24") Then lblGlockCal3.Text = (".40 S&W")
        If txtGlock3.Text = ("27") Then lblGlockCal3.Text = (".40 S&W")
        If txtGlock3.Text = ("35") Then lblGlockCal3.Text = (".40 S&W")
        If txtGlock3.Text = ("20") Or txtGlock3.Text.ToString = ("20SF") Then lblGlockCal3.Text = ("10MM")
        If txtGlock3.Text = ("29") Or txtGlock3.Text.ToString = ("29SF") Then lblGlockCal3.Text = ("10MM")
        If txtGlock3.Text = ("40") Then lblGlockCal3.Text = ("10MM")
        If txtGlock3.Text = ("21") Or txtGlock3.Text.ToString = ("21SF") Then lblGlockCal3.Text = (".45 AUTO")
        If txtGlock3.Text = ("30") Or txtGlock3.Text.ToString = ("30S") Or txtGlock3.Text.ToString = ("30SF") Then lblGlockCal3.Text = (".45 AUTO")
        If txtGlock3.Text = ("36") Then lblGlockCal3.Text = (".45 AUTO")
        If txtGlock3.Text = ("41") Then lblGlockCal3.Text = (".45 AUTO")
        If txtGlock3.Text = ("37") Or txtGlock3.Text = ("38") Or txtGlock3.Text = ("39") Then lblGlockCal3.Text = (".45 G.A.P.")
        If txtGlock3.Text = ("42") Then lblGlockCal3.Text = (".380ACP")
        If txtGlock3.Text = ("31") Then lblGlockCal3.Text = (".357 SIG")
        If txtGlock3.Text = ("32") Then lblGlockCal3.Text = (".357 SIG")
        If txtGlock3.Text = ("33") Then lblGlockCal3.Text = (".357 SIG")

    End Sub

    Private Sub txtGlock4_TextChanged(sender As Object, e As EventArgs) Handles txtGlock4.TextChanged
        If txtGlock4.Text = ("17") Or txtGlock4.Text.ToString = ("17L") Then lblGlockCal4.Text = ("9MM")
        If txtGlock4.Text = ("19") Then lblGlockCal4.Text = ("9MM")
        If txtGlock4.Text = ("26") Then lblGlockCal4.Text = ("9MM")
        If txtGlock4.Text = ("34") Then lblGlockCal4.Text = ("9MM")
        If txtGlock4.Text = ("43") Then lblGlockCal4.Text = ("9MM")
        If txtGlock4.Text.ToString = ("43X") Then lblGlockCal4.Text = ("9MM")
        If txtGlock4.Text = ("45") Then lblGlockCal4.Text = ("9MM")
        If txtGlock4.Text = ("48") Then lblGlockCal4.Text = ("9MM")
        If txtGlock4.Text = ("44") Then lblGlockCal4.Text = (".22LR")
        If txtGlock4.Text = ("22") Then lblGlockCal4.Text = (".40 S&W")
        If txtGlock4.Text = ("23") Then lblGlockCal4.Text = (".40 S&W")
        If txtGlock4.Text = ("24") Then lblGlockCal4.Text = (".40 S&W")
        If txtGlock4.Text = ("27") Then lblGlockCal4.Text = (".40 S&W")
        If txtGlock4.Text = ("35") Then lblGlockCal4.Text = (".40 S&W")
        If txtGlock4.Text = ("20") Or txtGlock4.Text.ToString = ("20SF") Then lblGlockCal4.Text = ("10MM")
        If txtGlock4.Text = ("29") Or txtGlock4.Text.ToString = ("29SF") Then lblGlockCal4.Text = ("10MM")
        If txtGlock4.Text = ("40") Then lblGlockCal4.Text = ("10MM")
        If txtGlock4.Text = ("21") Or txtGlock4.Text.ToString = ("21SF") Then lblGlockCal4.Text = (".45 AUTO")
        If txtGlock4.Text = ("30") Or txtGlock4.Text.ToString = ("30S") Or txtGlock4.Text.ToString = ("30SF") Then lblGlockCal4.Text = (".45 AUTO")
        If txtGlock4.Text = ("36") Then lblGlockCal4.Text = (".45 AUTO")
        If txtGlock4.Text = ("41") Then lblGlockCal4.Text = (".45 AUTO")
        If txtGlock4.Text = ("37") Or txtGlock4.Text = ("38") Or txtGlock4.Text = ("39") Then lblGlockCal4.Text = (".45 G.A.P.")
        If txtGlock4.Text = ("42") Then lblGlockCal4.Text = (".380ACP")
        If txtGlock4.Text = ("31") Then lblGlockCal4.Text = (".357 SIG")
        If txtGlock4.Text = ("32") Then lblGlockCal4.Text = (".357 SIG")
        If txtGlock4.Text = ("33") Then lblGlockCal4.Text = (".357 SIG")

    End Sub

    Private Sub txtGun4_TextChanged(sender As Object, e As EventArgs) Handles txtGun4.TextChanged
        If txtGun4.Text.ToString = ("GLOCK") Then txtGlock4.Visible = True
        If txtGun4.Text.ToString = ("GLOCK") Then txtModel4.Visible = False
        If txtGun4.Text = ("") Then txtGlock4.Visible = False
        If txtGun4.Text = ("") Then txtModel4.Visible = True
        If txtGun4.Text.ToString = ("GLOCK") Then lblGlockCal4.Visible = True
        If txtGun4.Text.ToString = ("GLOCK") Then txtCaliber4.Visible = False
        If txtGun4.Text = ("") Then lblGlockCal4.Visible = False
        If txtGun4.Text = ("") Then txtCaliber4.Visible = True
    End Sub

    Private Sub PRINT_Click(sender As Object, e As EventArgs) Handles PRINT.Click


        PrintDialog1.Document = prntDoc

        PrintDialog1.PrinterSettings = prntDoc.PrinterSettings

        PrintDialog1.AllowSomePages = True

        If PrintDialog1.ShowDialog = DialogResult.OK Then
            prntDoc.PrinterSettings = PrintDialog1.PrinterSettings
            prntDoc.Print()
        End If



    End Sub

    Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click

    End Sub

    Private Sub prntPre_Click(sender As Object, e As EventArgs)
        PrintPreviewDialog1.ShowDialog()
    End Sub



    Private Sub btnGuns_Click(sender As Object, e As EventArgs) Handles btnGuns.Click
        Form4.Show()
    End Sub

    Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click
        txtAddress.Text = ("")
        txtCaliber1.Text = ("")
        txtCaliber2.Text = ("")
        txtCaliber3.Text = ("")
        txtCaliber4.Text = ("")
        txtDl.Text = ("")
        txtGlock1.Text = ("")
        txtGlock2.Text = ("")
        txtGlock3.Text = ("")
        txtGlock4.Text = ("")
        txtGun1.Text = ("")
        txtGun2.Text = ("")
        txtGun3.Text = ("")
        txtGun4.Text = ("")
        txtModel1.Text = ("")
        txtModel2.Text = ("")
        txtModel3.Text = ("")
        txtModel4.Text = ("")
        txtSerial1.Text = ("")
        txtSerial2.Text = ("")
        txtSerial3.Text = ("")
        txtSerial4.Text = ("")
        cboxAgency.Text = ("")
        cboxInstructors.Text = ("")
        cboxQual.Text = ("")
        Form4.txtCaliber10.Text = ("")
        Form4.txtCaliber9.Text = ("")
        Form4.txtCaliber8.Text = ("")
        Form4.txtCaliber7.Text = ("")
        Form4.txtCaliber6.Text = ("")
        Form4.txtCaliber5.Text = ("")
        Form4.txtGlock10.Text = ("")
        Form4.txtGlock9.Text = ("")
        Form4.txtGlock8.Text = ("")
        Form4.txtGlock7.Text = ("")
        Form4.txtGlock6.Text = ("")
        Form4.txtGlock5.Text = ("")
        Form4.txtGun10.Text = ("")
        Form4.txtGun9.Text = ("")
        Form4.txtGun8.Text = ("")
        Form4.txtGun7.Text = ("")
        Form4.txtGun6.Text = ("")
        Form4.txtGun5.Text = ("")
        Form4.txtSerial10.Text = ("")
        Form4.txtSerial9.Text = ("")
        Form4.txtSerial8.Text = ("")
        Form4.txtSerial7.Text = ("")
        Form4.txtSerial6.Text = ("")
        Form4.txtSerial5.Text = ("")
        tbxName.Text = ("")
    End Sub



    Private Sub cbOnline_CheckedChanged(sender As Object, e As EventArgs) Handles cbOnline.CheckedChanged
        If cbOnline.Checked Then lblCert.Visible = True
        If cbOnline.Checked Then txtOnline.Visible = True
        If cbOnline.Checked = False Then lblCert.Visible = False
        If cbOnline.Checked = False Then txtOnline.Visible = False
    End Sub

    Private Sub btnSave_Click_1(sender As Object, e As EventArgs) Handles btnSave.Click
        this button needs to save as word doc

    End Sub

    Private Sub SaveFileDialog1_FileOk(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles SaveFileDialog1.FileOk

    End Sub
End Class
 
Last edited by a moderator:
Please don't expect us to wade through a huge wad of code in the hope of finding what might be relevant. Post ONLY the relevant code and provide a FULL and CLEAR explanation of the problem.
 
im needing to make it save as a word document as the same way its printing. i cant find any information online on how to do such. i just need to know what i would put in the button on line 369 to make it work to do it
 
And why is all that code relevant? If you want to save a Word document, why can't you start by just saving "Hello World"? Start with the simplest example you can to isolate the functionality you want to learn. The next step is to search the web for whatever information you can find. In this case, you'd start by searching for "vb.net save word document" and go from there. There's no point our reproducing examples and information that is already out there and easily accessible. Once you have gleaned all you can from the wen and put it to what use you can, you can then come here with a specific question on the parts that are still giving you trouble, providing ALL the relevant information and ONLY the relevant information.

As a clue, you can use Office Interop if Word is installed on your system. That basically means remote-controlling an instance of the Word application that you create. If Word is not installed, you can't really create the old DOC format files but you can create DOCX files using the OpenXML SDK. You should decide which way you're going to do, research it, make your best attempt and then come back with a specific question if it doesn't work as you expect.
 
Back
Top