M Arslan Riaz
M Arslan Riaz

Reputation: 128

Converting WORD doc to PDF after using as template into Microsoft.Office.Interop.Word.Application() in c# win form

**This is a special case. I have used word doc as a template into Microsoft.Office.Interop.Word.Application() and I used it in my application at the end of all operations I want to convert this used document doc to PDF. I have to convert "document" doc whom I have shown in given code into PDF. This is very important for me please help me. Thanks **

 var application = new Microsoft.Office.Interop.Word.Application();
var document = new Microsoft.Office.Interop.Word.Document();
 document = application.Documents.Add(Template: ConnectDb.filepath);

Upvotes: 0

Views: 223

Answers (1)

Mikev
Mikev

Reputation: 2082

There is a tool name "Spire" that convert your Word to PDF.

You can install it as a NuGet package.

Spire Website

Example of Converting Word to PDF using Spire

Upvotes: 1

Related Questions