To quote part of my second post, when you posted this question earlier:
quote: (added now, words in red)
' A 'PrintDocument' is not something to be printed.
' It is a collection of settings, margins, portrait
' landscape, resolutions, default printer etc.
' What needs to be printed, OR PRINT PREVIEWED is introduced in the PrintDocument's
' PrintPage event handler subroutine (method).
unquote.
In my large example response to your earlier post;
find the section shown below and change 'textbox1.text'
to read 'txtDocument.Text'
Private Sub textbox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles textbox1.TextChanged
StringToPrint = textbox1.Text
End Sub
|