Your question, your audience. Choose who sees your identity—and your question—with question security.
Public Sub Command1_Click() ' Print the contents of the RichTextBox with a one inch margin ' PrintRTF Doc, AnInch, AnInch, AnInch, AnInch Combo1.Text = "HP LaserJet 1018" Dim Y As Printer For Each Y In Printers If Y.DeviceName = Combo1 Then ' Set printer as system default. Set Printer = Y ' Stop looking for a printer. Exit For End If Next 'Printer.ForeColor = &H80000008 'sets the text colour 'Printer.Orientation = vbproplandscape Printer.Print Doc 'prints whats in text1 Printer.EndDoc End Sub
Join the community of 500,000 technology professionals and ask your questions.