0

**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);
  • [This might helpful. Check with it.](https://stackoverflow.com/questions/607669/how-do-i-convert-word-files-to-pdf-programmatically) – Prasad bobade Mar 20 '19 at 08:53

1 Answers1

1

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

Mikev
  • 2,012
  • 1
  • 15
  • 27
  • Dear Sir i already know this we use string path to convert . Problem is this we are using that string in Given below – M Arslan Riaz Mar 20 '19 at 13:51
  • document = application.Documents.Add(Template: ConnectDb.filepath); – M Arslan Riaz Mar 20 '19 at 13:51
  • In the above line of code and now this document doesn't have only string. It hold whole template inside . so when i use "document" to use for covvetring gives me error . i need your help pls – M Arslan Riaz Mar 20 '19 at 13:53