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!

Formatting output to a printer

Status
Not open for further replies.

SirPaladin

Programmer
Jul 9, 1999
32
0
0
US
I am trying to create a report that I can send to my printer. I've been trying without success to learn how to do this. The Microsoft help touches on various points, but doesn't tie it together. Most frustrating is it refering to the 'Print' method of the Printer object. This do not exist as far as I can see, unless there's some library that I was supposed to tap into that was not mentioned.

It's a fairly simple report I'm trying to create. It's just a utility to print a page for each table in a database, and then each field in that table, tab over some to display the fields type, tab over some more to show the number of characters it's been allocated, and then next line for the next field.

Does anyone have an example of how to format output to a printer (or Print Preview first would be great) and then print it?
 
Hi,

printer.print does work, even though .print doesn't show up in the properties/methods combobox.

A good way of making a preview is to
Set MyDevice = Form1
and then write and draw everything on the form (using .currentX .currentY .PSet .Line etc.) when you are done:
Set MyDevice = Printer
And run through the same code, then everything will be send to the printer.

Good luck
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top