Printing html files using VBScript and the FreePDF software -


i ask vbscript:

is way open *.html file using firefox browser or microsoft internet explorer , make printed using special printer not default/standard printer?

the background: want make *.pdf file using freepdf software.

the data source local *.html file (without images).

could use vbscript/vb command "createobject" create vb "application" object? know ... use create new word or excel file ...

i use following code:

https://srccode.wordpress.com/2011/01/28/vba-pdf-dokumente-mit-free-pdf-xp-erzeugen/

the web site shows way send files freepdf software pdf printer.

in first step create postscript file , send freepdf printer.

example: create new *.ps out of excel this:

dim ws worksheet set ws = application.activesheet  dim strdocument string strdocument = "c:\tmp\hello"    ' name der ausgabedatei ohne extension  dim strpostscript string strpostscript = strfile & ".ps"  ws.printout , , , , "freepdf xp", true, , strpostscript  dim strfilepdf string strfilepdf = replace(strfileps, ".ps", ".pdf")  dim owsc object dim oexec object  set owsc = createobject("wscript.shell")  set oexec = owsc.exec(freepdfexe & " /q /o " & strfilepdf & " " & strfileps)  while oexec.status = 0     sleep 200 loop  kill strfileps  debug.print oexec.status 

i tried realize using firefox , iexplorer didn't work.

has new ideas?

it possible use pdf printer software because mustn't install others on customers system. freepdf installed on every system deliver our customers.

 olecmdid_print                  = 6,   olecmdid_printpreview           = 7,   olecmdid_pagesetup              = 8,  

execwb method


executes command on ole object , returns status of command execution using iolecommandtarget interface.

syntax

object.execwb( _     cmdid olecmdid, _     cmdexecopt olecmdexecopt, _     [pvain variant,] _     [pvaout variant]) 

parameters

cmdid long represents identifier of command execute. more information on command identifiers, see mshtml command identifiers.

cmdexecopt

olecmdexecopt value specifies command options.

pvain

optional. variant used specifying command input arguments.

pvaout

optional. variant used specifying command output arguments.

the olecmdexecopt enumeration specifies command execution options. 1 value enumeration passed in ncmdexecopt argument of iolecommandtarget::exec.

typedef enum   {      olecmdexecopt_dodefault        = 0,      olecmdexecopt_promptuser       = 1,      olecmdexecopt_dontpromptuser    = 2,      olecmdexecopt_showhelp         = 3  } olecmdexecopt;