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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Preview in VB

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Dear Friends

Is there any simple function to perform the print preview; I need this function to preview the desired printing before the user confirm the print command; your fast reply will be highly appreciated

Thanks all
 
what you nead to do is find a reporting tool and use it. i tired for 2 months to print in v.b and realized it is a hard mission. you might consider using word or powerpoint to send things throw vba.

if you tell me exactly what you want to do i can help you some more

zeev
 
Hi,

Printing from VB is not easy and you might consider Zeev suggestion, but it is possible! also with a preview:
- Declare a variable 'MyPrint as variant' and 'Set MyPrint=form1'
- Place everything on the form using MyPrint.currentX and .currentY .print and .pset, .line etc. This will make up your preview.
- 'Set MyPrint=printer' and run the same code that showed the preview on the form and it will come out on the printer as it was shown on the form.

Good luck X-)
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
I dont think its that hard. There are some readymade source code available in MSDN. check out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top