No Application object, no Printer object?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The following code: Dim prt As printer
generates an 'undefined type' error. I can't find "printer" in the object
browser. Access.Application doesn't include a Printer type.
Is there a resource that I need to install to be able to access a printer
from VBA ?
(Acess 2000 ver 9.0.6926 SP-3)
(Vis Bas 6.0 / VBA 6.4.8869)
(installed references: VBA, Access 9.0 ObjLib and DAO 3.6 ObjLib)

Related question: is there any way to control the margins for printed code?

Leonard
 
Hi

I don't know about Access 9.0, but Access 11.0 ObjLib does contain Printer
and Printers classes with members that can do just about anything you might
need your printer to do.

Perhaps this is a recent addition?

BW
 
Wordstar said:
The following code: Dim prt As printer
generates an 'undefined type' error. I can't find "printer" in the
object browser. Access.Application doesn't include a Printer type.
Is there a resource that I need to install to be able to access a
printer from VBA ?
(Acess 2000 ver 9.0.6926 SP-3)
(Vis Bas 6.0 / VBA 6.4.8869)
(installed references: VBA, Access 9.0 ObjLib and DAO 3.6 ObjLib)

Related question: is there any way to control the margins for printed
code?

Leonard

This object was added to the 2002 (xp) version, if I recall correct.
Here is some information and code, which I must admit I haven't used,
but it is supposed to be able to control the printer.

http://www.mvps.org/access/reports/rpt0009.htm
 
Thanx BW. I've found 'hints' in the MS knowledgebase implying that the
printer object appeared in later versions. I'm thinking it may be time to
upgrade.
L
 
Back
Top