Package words.document

Source Code of words.document.AsposeSaveDocument

package words.document;

import com.aspose.words.Document;
import com.aspose.words.DocumentBuilder;
import com.aspose.words.SaveFormat;

public class AsposeSaveDocument
{
  public static void main(String[] args) throws Exception
  {
    Document doc = new Document();

    // DocumentBuilder provides members to easily add content to a document.
    DocumentBuilder builder = new DocumentBuilder(doc);
   
    // Write a new paragraph in the document with some text as "Sample Content..."
    builder.writeln("Aspose Sample Content for Word file.");
   
    // 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.
    doc.save("data/Aspose_SaveDoc.docx",SaveFormat.DOCX);
   
        System.out.println("Process Completed Successfully");
  }
}
TOP

Related Classes of words.document.AsposeSaveDocument

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.