I would like to ask something about VBScript:
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?
The background: I want to make a *.pdf file using the FreePDF software.
The data source is a local *.html file (without any images).
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 ...
I would like to use the following code:
https://srccode.wordpress.com/2011/01/28/vba-pdf-dokumente-mit-free-pdf-xp-erzeugen/
The web site shows a way to send files to the FreePDF software which is a pdf printer.
In a first step you create a postscript file and then send it to the FreePDF printer.
Example: You could create a new *.ps out of excel like this:
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 & ".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 & " /q /o " & strFilePdf & " " & strFilePs)
Do While oExec.Status = 0
Sleep 200
Loop
Kill strFilePs
Debug.Print oExec.Status
I tried to realize this using firefox and the iexplorer but it didn't work.
Has anybody new ideas?
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.