G
Guest
Before I ask my question, let me admit up front that I am VBA ignorant. I've
done programming in other languages, and I am trying to grasp the concepts of
VBA. I've looked all over this website, and Googled what I'm trying to do,
and I'm still just not quite getting it.
I have a macro that prints a set of about 10 or 15 different reports. Before
each report prints, I want the macro to call a VBA function that will set the
default printer to one specific printer. This is to make sure that when the
reports are printed using this macro, they print to the laser printer and not
to the Acrobat Distiller. Here is the code I tried in a VBA module, and which
doesn't work.
Function setPrinter(Application.Printer)
Set Application.Printer = Application.Printers("Acrobat Distiller")
End Function
This should be simple ... what am I doing wrong?
Many thanks,
GwenH
done programming in other languages, and I am trying to grasp the concepts of
VBA. I've looked all over this website, and Googled what I'm trying to do,
and I'm still just not quite getting it.
I have a macro that prints a set of about 10 or 15 different reports. Before
each report prints, I want the macro to call a VBA function that will set the
default printer to one specific printer. This is to make sure that when the
reports are printed using this macro, they print to the laser printer and not
to the Acrobat Distiller. Here is the code I tried in a VBA module, and which
doesn't work.
Function setPrinter(Application.Printer)
Set Application.Printer = Application.Printers("Acrobat Distiller")
End Function
This should be simple ... what am I doing wrong?
Many thanks,
GwenH