Posts

Showing posts from May, 2022

C#/VB.NET:Convert Word to RTF

Image
        RTF is the abbreviation of Rich Text Format, which means multi-text format, and files such as images can be embedded in RTF documents. This is the document format that Word can save for compatibility with other Word processing software. This article will introduce how to convert Word to RTF format through Spire.Doc for .NET. Install Spire.Doc for .NET To begin with, you need to add the DLL files included in the Spire.Doc for.NET package as references in your .NET project. The DLLs files can be either downloaded from this link or installed via NuGet . PM> Install-Package Spire.Doc Here are the steps: l   Create Word document   l   Using the document.LoadFromFile () method to load the file from disk. l   Using document.SaveToFile() method to save the file in RTF format. Full Code: [C#] using System; using Spire.Doc; using Spire.Doc.Documents;   namespace ConvertToRtf {     public partial cla...

C#/VB.NET: How to set Word paragraph shading ?

Image
       As everybody knows, paragraph shading plays a significant role in article. It can effectively attract readers' attention and achieve the effect of highlighting the key points of the article.         Spire.Doc for .NET , an easy-to-use component to operate Word document for developers' .NET applications, enables users to set Word shading for paragraphs in document. This guide will focus on how to realize this function by using C#, VB.NET via Spire.Doc for .NET. This article will show you how to set Word paragraph shading in C#/VB.NET.    Install Spire.Doc for .NET To begin with, you need to add the DLL files included in the Spire.Doc for.NET package as references in your .NET project. The DLLs files can be either downloaded from this link or installed via NuGet . PM> Install-Package Spire.Doc Here are the steps: Create Word document and using the document.LoadFromFile()method to  load  the file from ...