Declare Function aht_apiWriteProfileString Lib "kernel32" Alias "WriteProfileStringA" (ByVal strAppName As String, ByVal strKeyName As String, ByVal strValue As String) As Integer Function SetDefPrinter(Drajver As String) As Boolean SetDefPrinter = (aht_apiWriteProfileString("Windows", "Device", Drajver) <> 0) End Function Function Pozivdefprinter() Dim Drajver As String Dim Vrijednost As Boolean Drajver = "Microsoft Office Document Image Writer,Winspool" Vrijednost = SetDefPrinter(Drajver) End Function