Thank You. That is just the information I needed.
>It is a port designation in the Registry. To get for Excel I am using this:
>
> printer_name=SET("print",2)
> DECLARE INTEGER GetProfileString IN kernel32;
> STRING lpAppName,;
> STRING lpKeyName,;
> STRING lpDefault,;
> STRING @GetProfileString_ReturnedString,;
> INTEGER _nSize
>
> _nSize = 4096
> GetProfileString_ReturnedString = Repli (Chr(0), _nSize)
>
> lnResult = GetProfileString("Devices", ;
> printer_name, ;
> "#empty#",;
> @GetProfileString_ReturnedString, ;
> _nSize)
>
> lckeyValue=Left(GetProfileString_ReturnedString, lnResult)
>
> *port
> ?substr(lcKeyValue,at(',',lcKeyValue)+1)
>
>
>
>
>>I want to set the activeprinter property in excel so that it will print to the printer the user selected from within my foxpro application. After looking at the value in excel, before attempting to change it, it has the name of the printer and "on Ne06:" this is the port. In VFP5 aprinters would return this information in the second column, now in 8 a text description of the port is returned and excel throws and error and the document isn't printed. Is there a simple way to get this port information in 8?