Excel - Macro to print to IP address

Asked By Larry on 03-Sep-08 07:48 AM
Can someone help me with a macro to print to an IP address. I have a stand
alone network printer that i want to print to and everyone has the printer
named differently on their computer. The only constant is the IP address.

Thanks in advance,

Joe replied on 03-Sep-08 08:10 AM
Add a new Printer using IP address using the following instructios.  Then use
the new printer.

1) Start button - Settings - printer and fx
2) Add printer
3) Next - Local Printer attached to this computer.  Un-check automatically
detect and install my Plug and Play Printer
4) Next - Create a new Port - Standard TCP/IP Port
5) Next - Next
6) Enter IP Address For Printer in  Printer Name or IP Address
7) continue responding to questions until New Printer is installed
8) Go back to excel and select the new printer.
Larry replied on 03-Sep-08 09:50 AM
Thanks, but the question was not how ti install a network printer. I need a
macro that will print to a printers IP address.
Joe replied on 03-Sep-08 10:51 AM
Onced you have a printer installed all you have to do is select thie correct

Application.ActivePrinter = "\\MYSPOOL\EASTPRINTER on AB10:"

You need to have a spooler on windows to send the data over the internet.
types of sppolers would be a Print Spooler, or a Mail Spooler, or some other
type of program that send data over the internet like FTP, HTTP.

You have an open excel file that you need to format and send over the
internet.  A printer won't accept an excel file directly.  You could print to
a file and then send the file to the printer.  You would need to use FTP to
sent the file to the printer.