title: Printing html files using VBScript and the FreePDF software
body: <p>I would like to ask something about VBScript:</p>
  
  <p>Is a way to open a *.html file using the firefox browser or the microsoft Internet Explorer and make it be printed using a special printer which is not the default/standard printer?</p>
  
  <p>The background:
  I want to make a *.pdf file using the FreePDF software.</p>
  
  <p>The data source is a local *.html file (without any images).</p>
  
  <p>Could I use the VBScript/VB command "createobject" to create a VB "Application" object?
  You know ... you use it to create a new word or excel file ...</p>
  
  <p>I would like to use the following code:</p>
  
  <p><a href="https://srccode.wordpress.com/2011/01/28/vba-pdf-dokumente-mit-free-pdf-xp-erzeugen/" rel="nofollow">https://srccode.wordpress.com/2011/01/28/vba-pdf-dokumente-mit-free-pdf-xp-erzeugen/</a></p>
  
  <p>The web site shows a way to send files to the FreePDF software which is 
  a pdf printer.</p>
  
  <p>In a first step you create a postscript file and then send it to the FreePDF 
  printer.</p>
  
  <p>Example: You could create a new *.ps out of excel like this:</p>
  
  <pre><code>Dim ws As Worksheet
  Set ws = Application.ActiveSheet
  
  Dim strDocument As String
  strDocument = "C:\tmp\hello"    ' Name der Ausgabedatei ohne Extension
  
  Dim strPostScript As String
  strPostScript = strFile &amp; ".ps"
  
  ws.PrintOut , , , , "FreePDF XP", True, , strPostScript
  
  Dim strFilePdf As String
  strFilePdf = Replace(strFilePs, ".ps", ".pdf")
  
  Dim oWsc As Object
  Dim oExec As Object
  
  Set oWsc = CreateObject("WScript.Shell")
  
  Set oExec = oWsc.Exec(FREEPDFEXE &amp; " /q /o " &amp; strFilePdf &amp; " " &amp; strFilePs)
  
  Do While oExec.Status = 0
      Sleep 200
  Loop
  
  Kill strFilePs
  
  Debug.Print oExec.Status
  </code></pre>
  
  <p>I tried to realize this using firefox and the iexplorer but it didn't work.</p>
  
  <p>Has anybody new ideas?</p>
  
  <p>It is possible to use this pdf printer software because I mustn't install others on the customers system.
  FreePDF is installed on every system we deliver to our customers.</p>