printing

i have two printers installed(Win98). the default
printer is an HP812c, the other is a panasonic.

when i go to the printer selection and select the panasonic, it still prints to the HP but uses the panasonic PDF.

What is wrong? the panasonic is on lpt2, the HP just says "Local" when i bring up the printer selection screen.why does it say "Local" when it is connected to Lpt1?

i want to write a label program for this printer but if i am not able to select it then i have a problem.
[514 byte] By [rockinron] at [2007-11-15 17:36:21]
# 1 Re: printing
'the printer object has a Port property you have to set
'here is an example from MSDN on How to select printer on LPT2:
Dim P as Object
for Each P In Printers
If P.Port = "LPT2:" Or P.DeviceName Like "*LaserJet*" then
set Printer = P
Exit for
End If
next P


Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make dev-archive a great place.
Come back soon, you Gurus.

The Rater
Cimperiali at 2007-11-10 0:44:16 >
# 2 Re: printing
i already tried your suggestion. it still prints to the HP.
rockinron at 2007-11-10 0:45:13 >
# 3 Re: printing
Post the code you used

Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make dev-archive a great place.
Come back soon, you Gurus.

The Rater
Cimperiali at 2007-11-10 0:46:22 >
# 4 Re: printing
the same as you sent me

dim p as object

if p.port =- "lpt2:" then
set printer = p
exit for
end if

next p
rockinron at 2007-11-10 0:47:22 >
# 5 Re: printing
try testing with:
if Lcase(p.port) = "lpt2:" then
and put a breakpoint to see if you enter the following statements

Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make dev-archive a great place.
Come back soon, you Gurus.

The Rater
Cimperiali at 2007-11-10 0:48:21 >
# 6 Re: printing
i found the problem. in windows printer setup, BOTH printers were set to lpt2.
i changed the settings and it is ok but i have a new problem. i will post a new question.
rockinron at 2007-11-10 0:49:17 >