Thread: print macro
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default print macro

Don's suggestion will probably be your best bet to get the exact printer
address. You can take a shortcut and just set the printer up manually, then
run this lilltle snippet to see what the address looks like:

Sub prtTest()
MsgBox ActivePrinter
End Sub


"rbemmer" wrote in message
...
Here's the code I'm using. Even with \\Server\Printer in the code the
macro
still prints to my local default printer instead of the network printer.

For i = 1 To 99
Err.Clear
On Error Resume Next
Application.ActivePrinter = "\\SRVR01\Estimates on Ne0" & 1 & "."
If Err.Number = 0 Then Exit For

"JLGWhiz" wrote:

ActivePrinter = \\Servername\PrinterName


"rbemmer" wrote in message
...
Is there a way to write a macro that will change the default printer on
my
local machine to a network printer ie... \\server\printer?