Page 1 of 1

Printing to a printer other than Default

Posted: Tue May 22, 2007 2:14 pm
by gooser60
The manual states (in regards to the print command):
Use this action to print one or more document files, such as Microsoft Word .Doc files, to the default printer. For example, you can use this action to automatically print daily backup logs.
Question:
I assume the above answers my question, but I just wanted to make sure.  Is it possible to tell RoboTask to printer other than the default (i.e a network printer) that isn't my default printer?
If RoboTask cannot do this, then this would be an enhancement request for Oleg, and if RoboTask can already do this, then this might be an enhancement request for me! :)

Printing to a printer other than Default

Posted: Sat Jun 02, 2007 10:13 am
by Oleg
RoboTask uses shell function of system to print document. This function provide printing the document with default settings, i.e. onto default printer.
I think that it is possible to solve this problem with basic script, like this

Sub Main
   Dim App As Object

   Set App = CreateObject("Word.Application")

   With App
      .Documents.Open "D:\testdoc.doc"
      .ActivePrinter = "Epson stylus photo R220 Series"
      .PrintOut
   End With

   'Quit Word
   App.Quit
   Set App = Nothing

End Sub