Results 1 to 2 of 2
2005-03-08, 04:10 #1
- Join Date
- Aug 2002
- Sierra Madre, California, USA
- Thanked 0 Times in 0 Posts
Printer to IP Address Printer ( Word - any)
I wrote a macro that sets up some page settings and then prints to a particular bin of a particular printer. The problem is that the printer is no longer on the server - it's at an IP address.
The properties of the printer now say IP_xxx.xx.xx.xx The name of the printer is the same, but it won't print - even when I take out the reference to the server. Is there a special way to code for an IP address?
This is what I used when the printer was on the server:
<pre>Dim strDefaultPrinter As String 'used to capture default printer
Const strPrinter_1 As String = "FREDHP LaserJet 4050 Series on NE03:"
Const strBin_1 As String = 256 'Letterhead
Const strBin_2 As String = 258 'white bond
On Error GoTo errHandler
strDefaultPrinter = Application.ActivePrinter 'capture active printer
ActivePrinter = strPrinter_1 'change to appropriate printer
With ActiveDocument.PageSetup 'change to appropriate bins
.FirstPageTray = strBin_1
.OtherPagesTray = strBin_2
ActiveDocument.PrintOut 'prints document
ActivePrinter = strDefaultPrinter 'reset to active printer
MsgBox "Message." & Err.Number & Err.Description, vbExclamation, "Error Message"
End Sub text</pre>
2005-03-08, 04:17 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: Printer to IP Address Printer ( Word - any)
You can try recording a macro an switch to another printer, then back to the printer in question. The recorded code should give you an idea of how to refer to the printer.