Phil_B
October 18th, 2006, 03:57 PM
Hi, I am getting a rather annoying problem with a Word macro that I set up to enable a user to click a button to send to a different default printer that I was hoping someone could help with.
In short, they need several versions of the same driver with different defaults for A4 mono, A4 colour, A3 mono, A3 colour.
So I set up the four drivers with their defaults on the print server (2003), then setup the following macros (or atleast just one for testing right now):
Sub SwitchPrinter()
Dim strActivePrinter As String
' Get active printer.
strActivePrinter = Application.ActivePrinter
' Change to the Colour Default printer driver.
Application.ActivePrinter = "A4 Colour"
' Print the active document to Colour Driver.
ActiveDocument.PrintOut
' Change back to the default printer.
Application.ActivePrinter = strActivePrinter
End Sub
This works fine with locally installed (local TCP/IP port) printers, but when I try and user the print server (with identical naming, and local dribers removed) I get the macro error 1121, highlighting the
*Application.ActivePrinter = "A4 Colour"* line
Yet this is definately named correctly!
Am I to conclude that Word macros will not support printer switching to printe server hosted devices?! Sounds like nonsense to me, but grateful if anyone has had a similar experience.
Unfortunately local IP printing is not an option, as although there are only 5 users, printing activity is logged for charging purposes at the print server, and of course this would circumnavigate this.
Thanks for any help :happy:
In short, they need several versions of the same driver with different defaults for A4 mono, A4 colour, A3 mono, A3 colour.
So I set up the four drivers with their defaults on the print server (2003), then setup the following macros (or atleast just one for testing right now):
Sub SwitchPrinter()
Dim strActivePrinter As String
' Get active printer.
strActivePrinter = Application.ActivePrinter
' Change to the Colour Default printer driver.
Application.ActivePrinter = "A4 Colour"
' Print the active document to Colour Driver.
ActiveDocument.PrintOut
' Change back to the default printer.
Application.ActivePrinter = strActivePrinter
End Sub
This works fine with locally installed (local TCP/IP port) printers, but when I try and user the print server (with identical naming, and local dribers removed) I get the macro error 1121, highlighting the
*Application.ActivePrinter = "A4 Colour"* line
Yet this is definately named correctly!
Am I to conclude that Word macros will not support printer switching to printe server hosted devices?! Sounds like nonsense to me, but grateful if anyone has had a similar experience.
Unfortunately local IP printing is not an option, as although there are only 5 users, printing activity is logged for charging purposes at the print server, and of course this would circumnavigate this.
Thanks for any help :happy: