How to convert from word to pdf .
using System;
using System.Data;
using System.Linq;
using System.Windows.Forms;
using Xceed.Words.NET;
using Microsoft.Office.Interop.Word;
public partial class new_test : Form
{
public new_test()
{
InitializeComponent();
}
public Microsoft.Office.Interop.Word.Document WordDocument { get; private set; }
private void button1_Click(object sender, EventArgs e)
{
var doc = DocX.Load("C:\\Users\\IT-TEAM\\Desktop\\text0\\tm.docx");
doc.SaveAs("C:\\Users\\IT-TEAM\\Desktop\\text0\\" + textBox1.Text + ".docx");
Microsoft.Office.Interop.Word.Application appWord = new Microsoft.Office.Interop.Word.Application();
WordDocument = appWord.Documents.Open("C:\\Users\\IT-TEAM\\Desktop\\text0\\" + textBox1.Text + ".docx");
WordDocument.ExportAsFixedFormat("C:\\Users\\IT-TEAM\\Desktop\\text0\\" + textBox1.Text + ".pdf", WdExportFormat.wdExportFormatPDF);
i use this code but every time it save the word show in Task Manager as still using word i tried
WordDocument.Close();
still showing in Task Manager