Codecs: How to convert RTF to DOCX?
In This Topic
SDK can convert RTF document to a DOCX document.
Here is C#/VB.NET code that shows how to convert RTF document to a DOCX document:
/// <summary>
/// Converts RTF document to a DOCX document.
/// </summary>
/// <param name="rtfFilePath">Path to a source RTF file.</param>
/// <param name="docxFilePath">Path to a result DOCX file.</param>
public static void ConvertRtfToDocx(string rtfFilePath, string docxFilePath)
{
Vintasoft.Imaging.Office.OpenXml.OpenXmlDocumentConverter.ConvertRtfToDocx(rtfFilePath, docxFilePath);
}
''' <summary>
''' Converts RTF document to a DOCX document.
''' </summary>
''' <param name="rtfFilePath">Path to a source RTF file.</param>
''' <param name="docxFilePath">Path to a result DOCX file.</param>
Public Shared Sub ConvertRtfToDocx(rtfFilePath As String, docxFilePath As String)
Vintasoft.Imaging.Office.OpenXml.OpenXmlDocumentConverter.ConvertRtfToDocx(rtfFilePath, docxFilePath)
End Sub