Created
January 27, 2023 12:08
-
-
Save conholdate-com-kb/315de44bfeee62e23b3a35ad2a19738f to your computer and use it in GitHub Desktop.
How to Convert Outlook Email to Word in Java. For more information, please follow link: https://kb.conholdate.com/total/java/how-to-convert-outlook-email-to-word-in-java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.groupdocs.conversion.Converter; | |
import com.groupdocs.conversion.licensing.License; | |
import com.groupdocs.conversion.options.convert.WordProcessingConvertOptions; | |
public class ConvertOutlookEmailToWordInJava { | |
public static void main(String[] args) { // Main function to convert Outlook email to Word in Java | |
// Remove the watermark in output Word document by adding license | |
License lic = new License(); | |
lic.setLicense("GroupDocs.Conversion.lic"); | |
// Load the source EML file for conversion to Word | |
Converter converter = new Converter("sample.eml"); | |
// Set the convert options for DOCX format | |
WordProcessingConvertOptions options = new WordProcessingConvertOptions(); | |
// Convert and save the EML in DOCX format | |
converter.convert("converted.docx", options); | |
System.out.println("Done"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment