How to Convert Word to RTF

Why Convert Word to RTF?

Since 1990s, Microsoft began to use .doc extension for a range of their proprietary word processing formats. Doc format is usually associated with Microsoft Office applications. But storing text in Doc files is not always convenient, as they are not compatible with the majority of third-party text editors. To make Doc information more accessible, it is better to store it in other, more common format. And as a rule, users select RTF format, because it is supported by the wide range of applications.

How to Convert Word to RTF with Spire.Doc?

Spire.Doc can convert Word to RTF without Microsoft Office installed on your system. Download Spire.Doc (or Spire.Office) with .NET Framework 2.0 (or above) and follow the simple steps below to convert Word to RTF.

Step 1: Create a project through Visual Studio and add Spire.Doc DLL as reference.

Step 2: Load local Word doc file which we need to convert to RTF format. Use the code below to load Word file.

            Document document = new Document();

Step 3: Spire.Doc allows users to convert Word doc files to most of popular file formats including PDF, HTML, RTF, EPub, XML, Dot, Text, etc. The following code can help us convert Word to RTF.

document.SaveToFile("Sample.rtf", FileFormat.Rtf);

Step 4: Copy the full code below into the project and start the project by pressing F5.

Full Code:

using Spire.Doc;
using System;

namespace DOCRTF
    class Program
        static void Main(string[] args) { }
        private void button1_Click(object sender, EventArgs e)
            //Create word document
            Document document = new Document();

            //Save doc file.
            document.SaveToFile("Sample.rtf", FileFormat.Rtf);

            //Launching the MS Word file.

        private void WordDocViewer(string fileName)
            catch { }
Imports Spire.Doc

Namespace DOCRTF
	Class Program
		Private Shared Sub Main(args As String())
		End Sub
		Private Sub button1_Click(sender As Object, e As EventArgs)
			'Create word document
			Dim document As New Document()

			'Save doc file.
			document.SaveToFile("Sample.rtf", FileFormat.Rtf)

			'Launching the MS Word file.
		End Sub

		Private Sub WordDocViewer(fileName As String)
			End Try
		End Sub
	End Class
End Namespace

Effective Screenshot:

Word to RTF