Exception on saving Word to EML file format

Exception on saving Word to EML file format

Traceback (most recent call last):
File “D:\kb-python\kbconversion.py”, line 22, in
converter.convert(“output.eml”, convert_options)
RuntimeError: Proxy error(ConversionNotSupportedException): Conversion from docx (Word Processing) to eml (Email) is not supported.

ref : Convert a Document to Another Format | Documentation

import os
from groupdocs.conversion import License, Converter
from groupdocs.conversion.options.convert import EmailConvertOptions 
from groupdocs.conversion.filetypes import EmailFileType 

# If you have a license, uncomment the following lines to set it
license_path = os.path.abspath("./GroupDocs.Conversion.lic")
if os.path.exists(license_path):
    # Create License and set the path
    license = License()
    license.set_license(license_path)

# Load the source DOCX file
converter = Converter("input.docx")

# Set conversion options for EML format
convert_options = EmailConvertOptions()
# Set output email format as EML
convert_options.format = EmailFileType.EML

# Convert DOCX to EML
converter.convert("output.eml", convert_options)

# Print success message
print("Conversion completed successfully.")

input.docx (303.7 KB)

@tahir.manzoor

Unfortunately, this conversion pair is not supported.

To get the list of supported conversion pairs use code from Example 2: Get Possible Conversions by File Extension.

The list of the supported conversions for DOCX file format is the following:

Source format: Microsoft Word Open XML Document (docx)

Primary conversions: [epub, mobi, azw3, tiff, tif, jpg, jpeg, png, gif, bmp, ico, psd, wmf, emf, dcm, dicom, webp, jp2, j2k, emz, wmz, svgz, tga, psb, jfif, eps, xps, tex, ps, pcl, svg, pdf, ppt, pps, pptx, ppsx, odp, otp, potx, pot, potm, pptm, ppsm, fodp, htm, html, mhtml, mht, doc, docm, docx, dot, dotm, dotx, rtf, odt, ott, txt, md]
Secondary conversions: [xls, xlsx, xlsm, xlsb, ods, xltx, xlt, xltm, tsv, xlam, csv, fods, dif, sxc]