I am trying to print an RTF, i have an RTF TextBox on my VB6 form. with a command button code attached.
my RTF file has a table i can see it on screen formatted properly but when i print i get laods of code priting rather than my form, as if i had opened the RTF in notepad.
Any ideas how i can fix this, Kindest Regards
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.
'Printer.ForeColor = &H80000008 'sets the text colour
'Printer.Orientation = vbproplandscape
Printer.Print Doc 'prints whats in text1