Printers Toner level status script

Dear, I am looking to create a VBA script to perform the task of capturing the toner printer status a percentage. Recalling that the printers are networked. It is possible?

------------------------------------------------------------------------

Referring to my question on the forum, you said three solutions.

But how would the implementation of these two solutions:

2. If the printer has a web interface and it shows toner levels, You could query the web page using IE automation or XMLHttpRequest. This is probably the easiest option.

3. Run Telnet command (s) from VBA and capture and parse the output, if toner level data is provided.

I am new in this area of process automation via VBA script, you help me?

_Follow the link in my spreadsheet development: _*http://1drv.ms/1LPvnom
*

*Below is a possible solution to my problem also could not implement in my spreadsheet.*

*Then also enter the source code of web access printer page.

*

-------------------------------------------------------------------

Substatus_impressora()
'
'status_impressora Macro
'Retorna o status do tonner da impressora na rede
'
'Atalho do teclado: Ctrl+s
'
WithActiveSheet.QueryTables.Add(Connection:= _
"URL;http://*200.200.200.200* (http://<strong>200.200.200.200</strong>)",Destination:=Range*( _"$F$4"))* 
.Name= *nvel_toner*
.FieldNames= True
.RowNumbers= False
.FillAdjacentFormulas= False
.PreserveFormatting= True
.RefreshOnFileOpen= False
.BackgroundQuery= True
.RefreshStyle= xlInsertDeleteCells
.SavePassword= False
.SaveData= True
.AdjustColumnWidth= True
.RefreshPeriod= 30
.WebSelectionType= xlSpecifiedTables
.WebFormatting= xlWebFormattingNone
.WebTables= """ctl12_dtgMateriaisSerial""" *'**The ID TABLE WHERE IS THE STATUS OF TONNER LOOK NO HTML*
.WebPreFormattedTextToColumns= True
.WebConsecutiveDelimitersAsOne= True
.WebSingleBlockTextImport= False
.WebDisableDateRecognition= False
.WebDisableRedirections= False
.RefreshBackgroundQuery:=False
EndWith
EndSub
-------------------------------------------------------------------------------------------------------------------------------


Good afternoon,


I am with this worksheet, I could not implement this script in my spreadsheet.


For me to analyze the toner level of the 20 printers that I am responsible, it will be necessary to create a user form and a button?


Or which feature exactly I could use.


As the attached spreadsheet data is shown by the Range F4 to F24.


And script_commands file is the printer HTML command line.


Since already thank their support.

------------------------------------------------------------

_Follow the link in my spreadsheet development: _*http://1drv.ms/1LPvnom*
---End Quote--

September 10th, 2015 11:26am

Hi,

We do not handle VBA here. This forum is for admin scripting.

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 11:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics