Hi all,
My default printer is kyosera 1000. I use following code to select the printer from a print dialog in external application:The above code selects Kyosera 2500 without any issues. but prints on Kyosera 1000 which is my default printer.VB Code:
hMain = FindWindow("#32770", "Print") hChild = FindWindowEx(hMain, 0, "ComboBox", vbNullString) nret = SendMessage(hChild, CB_FINDSTRINGEXACT, 0, "Kyosera 2500") If nret <> -1 Then 'To select the printer in combo Call SendMessage(hChild, CB_SETCURSEL, nret, 0) End If
post me your suggestions.




Reply With Quote