I have a folder containing 1650 HTML files that, due to local authorities, must be also printed in paper form.
I have tried with classic ctrl+A (even if I was trying on smaller quantities) and then I have looked for PRINT label in the right click menu, but there's any.
If I choose to print multiple jpg or pdf files, the PRINT voice appears.
How am I supposed to print multiple html files? A batch file? (I have no knowledge about how to).
I have also thought to convert html to pdf, but had no success with PDF Creator and PDF Architect.
Any of you with some experience to share? I have wrtten some code mixing the one given by Tim and what I found on stackoverflow, but had no success.
Here it is:
Set objFSO = CreateObject("Scripting.FileSystemObject")
objStartFolder = "C:\Users\mainUser\Desktop\ft"
Set objFolder = objFSO.GetFolder(objStartFolder)
Set colFiles = objFolder.Files
For Each objFile in colFiles
strFileName = objFile.Name
If objFSO.GetExtensionName(strFileName) = "html" Then
On Error Resume Next
Const OLECMDID_PRINT = 6
Const OLECMDEXECOPT_DONTPROMPTUSER = 2
Const PRINT_WAITFORCOMPLETION = 2
Dim objExplorer
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate objFolder.Path +"\"+ objFile.Name
objExplorer.Visible = 1
Do while objExplorer.ReadyState <> 4
WScript.Sleep 1000 'milliseconds
Loop
oIExplorer.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
End If
Next
It just opens one html in internet explorer. I thought it would have open all the files, and already in PRINT "mode". I think I am missing something.