title: How to print multiple html files on Windows 8 with VBS
body: <p>I have a folder containing 1650 HTML files that, due to local authorities, must be also printed in paper form.</p>
  
  <p>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.</p>
  
  <p>If I choose to print multiple jpg or pdf files, the PRINT voice appears.</p>
  
  <p>How am I supposed to print multiple html files? A batch file? (I have no knowledge about how to).</p>
  
  <p>I have also thought to convert html to pdf, but had no success with PDF Creator and PDF Architect.</p>
  
  <p>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.</p>
  
  <p>Here it is:</p>
  
  <pre><code>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 &lt;&gt; 4
              WScript.Sleep 1000 'milliseconds
          Loop
  
          oIExplorer.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
  
    End If
  
    Next
  </code></pre>
  
  <p>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.</p>