Don't want ShowPrinter to change default printer

I have a VB6.0 SP6 app in which I use a ShowPrinter to allow the user to select the printer to direct output to.

It works great except for the fact that the users just informed me that not only does it re-direct the current output to the selected output device but also makes the new output device the default printer.

Is there a way (using showprinter or something else) to provide the ability to re-direct output without changing the default printer?

LVL 1
mlcktmguyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pra_kumar03Commented:
Can you provide the code that you have put.
0
mlcktmguyAuthor Commented:
This is the code:

  cd1DescPrt.ShowPrinter

cd1DescPrt is a control dialog box on the form.
0
mlcktmguyAuthor Commented:
Anybody?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

pra_kumar03Commented:
what are you sending to the printer? anyhting like word doc? or reports ?
0
pra_kumar03Commented:
0
mlcktmguyAuthor Commented:
I am sending two different things:

1. Reports Defined in the VB 6.0 'report writer'
2. PrintForm

Thanks
0
pra_kumar03Commented:
try this
Dim sprinterpath As String
Dim sPrinter As Printer

sprinterpath = Printer.DeviceName
MsgBox sprinterpath
Me.CommonDialog1.ShowPrinter
For Each sPrinter In Printers
    If sPrinter.DeviceName = sprinterpath Then
        Set Printer = sPrinter
        Exit For
    End If
Next
0
pra_kumar03Commented:
if the above doesn't work then try this
http://support.microsoft.com/default.aspx?scid=kb;EN-US;266767
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pra_kumar03Commented:
hi
I tried the the simplest code of using the set printer but that does not work. I looked up some KB articles and it seems that won;t work after all. All articles did tell to use the KB 266767 of Microsoft to attain the same.
So you may go ahead and use that info and get the default printer name first then print the stuff on the specified printer and then set the default printer back.
That is the only soln i m able to think right now.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.