Microsoft small business knowledge base

Article ID: 155929 - Last Review: February 24, 2014 - Revision: 3.1

This article was previously published under Q155929
This article has been archived. It is offered "as is" and will no longer be updated.

On This Page


With the APRINTERS() function, you can place the names of printers currently installed in the Windows Print Manager into a memory variable array. The APRINTERS() function creates a two-dimensional array. The first column of the array contains the names of the currently installed printers, and the second column contains the ports to which the printers are connected. In Windows 95, if the specific printer's share name contains a space, the PRINTERS() function returns a separate array row with the same printer name in the first column and two incomplete share names in the second column. An example is a printer named MyPrinter on share \\MyPrinter Share. The APRINTERS() function produces the following two rows:
   Myprinter     \\MyPrinter
   Myprinter     Share


Use the GETPRINTER() function to print directly to the printer name instead of the share name. If the share name is required, concatenate the share name strings that have the same printer name in the first column of the array.


Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Steps to Reproduce Behavior

  1. Set up a Local Printer in Windows 95 or Windows NT. For this example, the printer name is "HP LaserJet 4Si MX" and the share name is "\\Tim\Test Printer."
  2. On a second Windows 95 computer, issue the following command in the Visual FoxPro Command window:
    The preceding command creates an array Lprint with the following elements:
          Lprint(1,1) = "HP LaserJet 4Si MX" , Lprint(1,2) = "\\Tim\Test"
          Lprint(2,1) = "HP LaserJet 4Si MX" , Lprint(2,2) = "Printer"

  • Microsoft Visual FoxPro 3.0 Standard Edition
  • Microsoft Visual FoxPro 3.0b Standard Edition
  • Microsoft Visual FoxPro 5.0 Standard Edition
  • Microsoft Visual FoxPro 6.0 Professional Edition
kbnosurvey kbarchive kbprb kbprint KB155929
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support