package wordSamples; import com.qoppa.word.WordDocument; public class PrintWord { public static void main (String [] args) { try { // Load the document WordDocument wd = new WordDocument ("input.doc"); // Print to the default printer wd.printToDefaultPrinter(null); // Print to a named printer wd.print("my printer", null); } catch (Throwable t) { t.printStackTrace(); } } }