Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
To Write anything in the Word Document using Aspose.Words for Java in Ruby, simply invoke print_hello_world() method of HelloWorld module.
Ruby Code
data_dir = File.dirname(File.dirname(File.dirname(__FILE__))) + '/data/quickstart/'
### a blank document.
document = Rjb::import('com.aspose.words.Document').new()
#### provides members to easily add content to a document.
builder = Rjb::import('com.aspose.words.DocumentBuilder').new(document)
##### a new paragraph in the document with the text "Hello World!"
builder.writeln("Hello World!")
\# Save the document in DOCX format. The format to save as is inferred from the extension of the file name.
\# Aspose.Words supports saving any document in many more formats.
document.save(data_dir + "HelloWorld.docx")
Download Hello World (Aspose.Words) from any of the below mentioned social coding sites:
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.