Using VB6.olb class objects

  • Thread starter Thread starter Paul S.
  • Start date Start date
P

Paul S.

I'm trying to write directly to the printer object from
VB6.olb in an access form vba procedure. I have been able
to add the reference, and it gives me visibility to all of
the printer procedures (currentx, currenty, etc.) but I
can't figure out how to set the object block. If I try
using Dim Printer1 as VB.Printer, any reference to
Printer1 returns an error Block not set. Any attempts to
set the block (Set Printer1=Application.Printer) gives me
an error that the variable types are not consistent.

Has anybody tried this, or can suggest a vba method that
can paint directly on the printer object?
 
What version of Access? Access 2002 and (I think) Access 2000 both have a
Printer object of their own.
 
I'm using Access XP (2002?) developer. There is a printer
object, but all it gives you visibility to is adjustment
of margins, etc. It won't let you print text or graphics
directtly to a print page, and it would be too cumbersome
to create a report for each version I need to print
(envelopes with delivery point bar codes. I've got a
visual basic process I'm trying to convert to native
Access so I don't have to bother with trying to register
an activex component with the installation process. So far
the only way I've been able to get the activex to install
is to install it separately.
 
Back
Top