Printer selection over network

robfo0

Active Member
Joined
Feb 19, 2002
Messages
281
Hi,

I have a problem. I have a macro in which a user selects a printer (there are 2) that is on the network. My code is as follows:

Application.ActivePrinter = "LX300 HALL on \Bacevedolx300 Hall"

But this code only works for windows 98 computers. When i recorded a macro on one of our windows 2000 computers, the code changes as follows:

Application.ActivePrinter = "\BACEVEDOLX300 HALL on Ne01:"

Is there a generic way to make this selection work for all operating systems? (by the way, the Ne01 i think depends on the order in which the printers are installed, so this may vary also.). These are the same printer but they are defined differently on different operating systems, I would really like to get the macro to work. Appreciate any help, thanks!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
You can try messing about with something like this to select the correct code for the operating system:

<pre>
If Environ("OS") <> "" Then
' It's NT
Else
' It's 95 or 98
End If</pre>

You should play around with this, this worked for me comparing NT4 and Win9x OS's.

HTH
 
Upvote 0
Hi

First remember Win98 was aweful, no it really was and SE2 was bad and Me was a mess, that out the way W98 likeW95 is domestic and will be friendly, if weak ..

But W2Y is NT5 as such and so is totally different and will work totally different, Wy2 is OK a OP's go XP better if patched, so the business says. Now W2K will have different calls thn W95 / 8

I try not to write scripts that jump OP's for these reason essentiall they are the same but have odd quirk, add that Novel or bespokes and fun and games are us.

You need to have codes to test OP and case select to run if 95 or 98 against NT version .

Problem i know that conflict

Printing is noteriousely frawt with issues. never works well.
Assigning emails on scripts
Calling reg codes in setup scripts, in rocket science scripts.
Ive had page setups bounce about never solved if how software loaded or windows.

Remeber this Excel cant print!

True it asks windows nicly to do it via print manager. not a lot of people know this but Windows check the drivers fully before ever print, why ive no idea one a boot would do but thats why printing delays prior to execution of print.

Now Windows check different to each, so the drivers need to be compatable ir Win95/8 are same but nothing like the NT4 drivers and WY2K drivers so will go a bit made thus the case select check idea.

NOW what the difference said all that.

the print drivers are required are the DLL files that set print things to makke the print fire and work ie WYSIWYK... else it will spoil.

Hope thats of some help..

Oh Fix... select case to test OP or drivers..
 
Upvote 0
Thanks guys, ill figure something out, leave it to microsoft to make my life harder! :)
 
Upvote 0
Hi

Funny i dont blame Microsoft for this, and as you will; know reading my post ill have goes at Microsoft over the day of the week if i could for their incompleate version they chuck out and if a few days developing Excel it would be REALLY REALLY cool not just Super cool!

Win95/8 are domestic products, WY2K is commercial

Domestic = home
Commercial = work

OK wonderful Microsoft have pulled the plug on 85 and 8 just for fun forcing updates esle registered software is no longer supported. so my original purchased joins win3.1 and 3.11 in the bin as worthless, and upgrade stink and even worse quatlity..

Did you know full or upgrade W95 was only serial number different, so depending what SN entered depended on what you got installed full or ungrae also starnge was OEM and DSP all on the same disk??? odd that.

So its a bit harsh to compair these two OP's

like For 2 wheel drive and 4by4 same ish....
 
Upvote 0

Forum statistics

Threads
1,213,561
Messages
6,114,316
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top