We have published a new article with a code sample to convert a DOC file to DOCX with the GdPicture.NET Document Converter:
https://www.gdpicture.com/blog/doc-docx-conversion
Here is the sample in C#:
Code: Select all
GdPictureStatus status;
using (GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter())
{
status = gdpictureDocumentConverter.LoadFromFile("input.doc");
if (status == GdPictureStatus.OK)
{
status = gdpictureDocumentConverter.SaveAsDOCX("output.docx");
if (status == GdPictureStatus.OK)
{
System.Windows.MessageBox.Show("The file has been saved successfully.", "GdPicture");
}
else
{
System.Windows.MessageBox.Show("The file has failed to save. Status: " + status.ToString(), "GdPicture");
}
}
else
{
System.Windows.MessageBox.Show("The file has failed to load. Status: " + status.ToString(), "GdPicture");
}
}
https://www.gdpicture.com/guides/gdpicture/Gd ... erter.html
Regards,
Elodie