Since VFP7, ASCAN() function have a new optional parameter, you can use to avoid EXACT settings & lower/upper case, in my code check for the 6th parameter. In the code I post the 13 means:
Case Insensitive; Return row number; Exact OFF So, if you have VFP7+ now you can chage it ;-)
>>You don't need loop through the APRINTERS() array, use ASCAN instead ...
>>>>lnPrinters = APRINTERS(laPrinters)
>>IF lnPrinters > 0
>> IF ASCAN(laPrinters,lcYourPrinter,1,lnPrinters,1,13) > 0
>> *** Do what you want to do...
>> ENDIF
>>ELSE
>> MESSAGEBOX("No installed printers")
>>ENDIF
>>
>Hello Esparta;
>The release 1.0 of this code, had ASCAN.. But, we change it, because ASCAN is affected by the state of EXACTLY ON/OFF and sometimes some ours work-mate didn't see for the upper/lower of some printer names..
>The best deal for our team was to change it.. So since that.. No problems at all..
>But thanks anyway..