Printing to a printer other than Default

Discuss RoboTask here
Post Reply
gooser60
Posts: 9
Joined: Mon Mar 19, 2007 12:52 pm
Location: United States

Printing to a printer other than Default

Post 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! :)
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Printing to a printer other than Default

Post 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
Post Reply