Modifying Printing Routine

F

Flavio Kaufmann

Hey all

we're finally migrating from Win98 to Win2k. However, during a test-run
it turned out that parts of our files need to be modified.

The problem now is a printing routine. Under Win98, we could just use
the following:

Const C_PrintQueue As String = "\\Server01\Lexmark Optra T610"

This doesn't seem to work anymore, it doesn't find the printer. While
searching, I found that I need to include the Network Port NExx: and
other things. Now, how exactly do I have to "describe" the printer in VBA?
Or better, is there a solution just to scan for "t610" and use this as
printer?
Alternatively we could just use the system's default printer to print it
out... but: how?

The printing routine itself is:

Application.ActivePrinter = C_PrintQueue
ActiveSheet.PrintOut

Any help would be greatly appreciated!

Thanks in advance
Flavio
 
J

Jonathan West

Hi Flavio

Select the printer manually, and see what the text of it is in the Print
dialog. Then set the C_PrintQueue to that value.

Alternatively, if you simply want to print to the current default printer,
remove the line of code that sets the Activeprinter property.
 
F

Flavio Kaufmann

Hello Jonathan

Thanks for the quick reply. Again I'd like to underline that I'm a
complete VBA newbie. However, your tip of just commenting out the set
active.printer thing worked fine.
Is there a way to read out the active.printer variable so I could just
insert it back in, given that the user change their default printer (or
to find out the name of another printer by setting it active temporarily).
Something like MsgBox "Active.Printer"
of course this doesn't work, but I hope you've got the idea :)

Thanks
Flavio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top