Module: Asposewordsjavaforruby::LoadTxt
- Defined in:
- lib/asposewordsjavaforruby/loadtxt.rb
Instance Method Summary collapse
Instance Method Details
#initialize ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/asposewordsjavaforruby/loadtxt.rb', line 3 def initialize() # The path to the documents directory. data_dir = File.dirname(File.dirname(File.dirname(__FILE__))) + '/data/' # Open the document. doc = Rjb::import('com.aspose.words.Document').new(data_dir + "LoadTxt.txt") # Save as any Aspose.Words supported format, such as DOCX. doc.save(data_dir + "LoadTxt Out.doc") end |