Here is some VBScript that will use Word to print a document. Simply pass the 
document and printer names (or plug them into the script). You can either use 
whatever terminal emulator you have to execute the script on the Client (of 
course putting the documents on the client or where the client can see them) or 
on the host - which you will likely want to make sure you don't get Word 
confused if you try to run too many concurrent print jobs (I'm guessing as I've 
never actually tested...)
 
hth
Colin Alfke
 
Const DoNotSaveChanges = 0
Set Arg = WScript.Arguments
DocumentName = Arg.Item(0)
' Pass the document as an argument or just set it.
' DocumentName = "d:\alfke2.htm"
Printer = Arg.Item(1)
' Pass the printer as an argument or just set it.
' Printer = "HP DeskJet 540"
With CreateObject("Word.Application")
' if you want to see Word, set .Visible to True
  .Visible = False
  .Documents.Open(DocumentName)
' Setting background to true will hide the printing
' Pages box, but it doesn't seem to actually print
  .Options.PrintBackground = False
' save current printer
  ActivePrinter = .Application.ActivePrinter
' set printer
  .Application.ActivePrinter = Printer
  .ActiveDocument.PrintOut
' reset printer
  .Application.ActivePrinter = ActivePrinter
' quit without saving any changes
  .Application.Quit DoNotSaveChanges
End With
 

        -----Original Message----- 
        From: Mark Johnson
        
        

        Now we're talkin'.
        Thanks.
        ----- Original Message -----
        From: <Stuart.Boydell
        
        
        > As you're on *nix you may be able to pipe the HTML output through an 
HTML
        > renderer (like java jRex or Calpane. Other alternatives might be using
        Perl
        > or the HTML text renderer Lynx) then to your printer.
        >
        > A quick google search shows there are several commercial products for 
this
        > type of application.
        >
        > S
        >
        > -----Original Message-----
        >
        > From: "Mark Johnson"
        >
        > Subject: [U2] HTML printing
        >
        > I would like to generate HTML code and have it go directly to a 
printer as
        > formatted output. Normally, a user would open the HTML in a browser, 
ie IE
        > then choose . I want to bypass the user step and go from the HTML to
        > the printer directly.

[demime 1.01d removed an attachment of type application/ms-tnef which had a 
name of winmail.dat]
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to