Peter, APrinters() is ia two dimensional array, the second element is the port.
Also aPrinters(<<arrayname>>,1) gives you all the printer information in an extended array. Dave Crozier -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Hart Sent: 16 April 2008 12:37 To: ProFox Email List Subject: RE: Excel Automation Hi All I am using PDFCreator to convert an Excel Spreadsheet to PDF. I am changing the Excel active printer with the code: oleExcel.Application.ActivePrinter = "PDFCreator on Ne01:" And then printing the sheet with the code: oleExcel.ActiveWindow.SelectedSheets.PrintOut(,,1,,"PDFCreator on Ne01:",,,) This worked OK till one of the operators added a Network printer on Ne01 so I have had to change the above code to oleExcel.Application.ActivePrinter = "PDFCreator on Ne00:" oleExcel.ActiveWindow.SelectedSheets.PrintOut(,,1,,"PDFCreator on Ne00:",,,) Question: Does anyone know of a way to find out the correct names of the printers installed. APRINTERS() only shows "PDFCreator" I need a way to let the operator set the full printer name of the PDF printer so the Computer He/She is using correctly prints to the right printer. I.e. Pick the PDF Printer, Store its name in a Preferences Table and then use that in the code. TIA Peter Peter Hart Computers. --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

