Hello,
I have a question
I am trying to find a network printer by using a function and wia object.
On a local PC this function works just fine but on a network it doesnt.
Does anyone know how to fix this?
This is my code
I have a question
I am trying to find a network printer by using a function and wia object.
On a local PC this function works just fine but on a network it doesnt.
Does anyone know how to fix this?
This is my code
Code:
Function SelectDevice()
Dim DevMgr As WIA.DeviceManager
Dim DevInfo As WIA.DeviceInfo
Dim dev As WIA.Device
Dim i As Integer
Set DevMgr = New WIA.DeviceManager
For i = 1 To DevMgr.DeviceInfos().Count
If MsgBox("Kies printer", vbQuestion + vbYesNo, "Beschikbare WIA apparaten") = vbYes Then
'update table field
DoCmd.RunSQL ("UPDATE tblClsSettings SET Waarde='" & CStr(DevMgr.DeviceInfos(i).Properties("Name")) & "' WHERE Id = 4")
End If
Next i
Set dev = Nothing
Set DevInfo = Nothing
Set DevMgr = Nothing
End Function