Hi there,

I am trying to set the default printer using VBA and every time I run it I get a run time error because it doesn't like the name of the printer I am specifying. When I ran this macro:

Sub get_printers()

On Error Resume Next

Set WshNetwork = CreateObject("WScript.Network")
Set oPrinters = WshNetwork.EnumPrinterConnections
For i = 0 To oPrinters.Count - 1 Step 1
Cells(i + 1, 1) = "Port " & oPrinters.Item(i) & " = " & oPrinters.Item(i + 1)
Next
End Sub
it tells me all my active printers and a list and the one I want to use is this:

Port 10.1.70.## = \\network\RICOH Aficio MP C2500 PCL 6

but when I use:

Application.ActivePrinter = "\\network\RICOH Aficio MP C2500 PCL 6"
or

Application.ActivePrinter = "RICOH Aficio MP C2500 PCL 6"
or

Application.ActivePrinter = "\\network\RICOH Aficio MP C2500 PCL 6 On Port 10.1.70.##"
I get these run time errors. Is there something wrong with how I am naming the default printer? Thanks for your help!