Printer change code (Mr. A. Kallal)

M

Mike

Hi,

While doing a websearch on changing printers for Access 2000 I came
across your site and downloaded your code (printch2k) and implemented
it into my program.

All works fine accept the return to the default printer, it does not
work in my case, there is no default printer set after the code is run
if I look at the printersection! So afterwards I have to manually set
the defaultprinter again.

My guess the problem is the writing to the win.ini file, because I see
nothing of a device in that file? I use windowsXP and Access 2000,
could that be a problem?

Any help much appreciated,

Thanks, Mike
 
A

Albert D.Kallal

yes, I seen that problem of the "default" printer going away. I believe that
the default printer is still set, but the "icon" does not show as such...

That code was/is designed to run on windows 95, 98, and thus it not the best
for windows XP (it does work as you note).

With a2002 and later, there is a built in printer object, and thus you don't
need my code anymore..

I don't have a solution to your problem, but it been a while since I looked
at that code.

You could try removing the code that is supposed "prevent this" problem.

So, try commenting out the

Call SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0, ByVal "windows")

The above updates windows to show the correct default printer. Since you are
switching back, then remove the above line...it might fix your problem
because less effort will be made to show the "new" default printer that you
only use for a short time......
 

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