Open a word file and print it out : Word « Windows Platform « Ruby






Open a word file and print it out


require "win32ole"

docfile = "yourDoc.doc"

word = WIN32OLE.new "Word.Application"
word.visible = true
word.documents.open docfile
word.options.printBackground = false

word.activeDocument.printOut
word.quit

 








Related examples in the same category

1.Using WIN32OLE with word
2.Write the Code to Insert Data into Word
3.Microsoft Word document