Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need componet or tool

Status
Not open for further replies.

bhavin12300

Programmer
Oct 12, 2006
24
IN
hi
is there any third party tool or component available which enable easily to print through the printer.
means tools which allow justification ,line,font color other feature.

if it is please do tell me
i am waiting
thanks in advance
 
I think you may need to be a little more explicit about what it is you want.

Current controls included with VB can already do what you describe, so maybe you want more than the already provided functionality. If so, what?
 
FWIW; on the rare occasion that I have needed to build and print a complex document, I have used HTML and the WebBrowser control.

Here is a really simple example:

Code:
Option Explicit

Private Sub Command_Click()
Dim doc As MSHTML.HTMLDocument

Set doc = WebBrowser.Document
doc.body.innerHTML = "<H1>Added on the Fly</H1>"

'Prompt user
'WebBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER

'Print without prompt
WebBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER

End Sub

Private Sub Form_Load()
WebBrowser.Navigate2 "about:blank"
End Sub
 
Sorry, I left in some code that isn't needed. This routine only needs the WebBrowser control:

Code:
Private Sub Command_Click()

WebBrowser.Document.body.innerHTML = "<H1>Added on the Fly</H1>"

'Prompt user
'WebBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER

'Print without prompt
WebBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top