JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
The code looks similar but you need to query the driver rather than the printer to determine status. There is a code snippet in the linked article.
Tried that. There are many properties for each printer driver of which 3 printer driver properties looked promising: StartMode, Started, Status.
Unfortunately, all 3 properties are blank for each installed printer driver on my PC
The DeviceName gives the default printer but there isn't a property to indicate whether it is switched on !
Right, you'd have to declare an Excel application instance and create it first, which is why I mentioned two lines of code rather than one.
I've discovered a lot of times in Access there have been little tricks I can do by automating Excel and because Excel is nifty at certain things, it actually ends up being less code than the access equivalent. I shouldn't say a lot of times. I should say it's happened to handful of times so it's sometimes occurs to me in situations like this.
Right, you'd have to declare an Excel application instance and create it first, which is why I mentioned two lines of code rather than one.
I've discovered a lot of times in Access there have been little tricks I can do by automating Excel and because Excel is nifty at certain things, it actually ends up being less code than the access equivalent. I shouldn't say a lot of times. I should say it's happened to handful of times so it's sometimes occurs to me in situations like this.
Sorry I misinterpreted what you meant. However, I've since tried it in Excel
?Application.PrintCommunication returns True for me whether or not the printer is switched on.
It was still true when I physically disconnected it from the PC
The help file suggests otherwise:
Application.PrintCommunication property (Excel) | Microsoft Docs
View attachment 94869
It correctly identifies the default printer (the only 'real' printer in the list) but reports it as 2 (unknown) whether or not it is switched on & ready to print.
I then found an item sitting in the EPSON print queue and removed it.
The printer status was then shown as 3 like all the rest whether or not it was switched on
Just wondering - has anyone checked whether those printer status values are correct? I haven't d
This thread has some similarities to several previous threads asking how to detect whether an Access BE is being connected using Wifi.
It is easy to determine whether a workstation has both Ethernet and Wifi connected but I've still not found a way of determining which is currently in use. For example see
Solved - Confirm LAN connection. | Access World Forums (access-programmers.co.uk)
.
This may be a similar issue. It should be easy to do but it appears otherwise