using Aspose.Words;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Word2Pdf
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        string dataDir;
        private void button1_Click(object sender, EventArgs e)
        {
            openFileDialog1.ShowDialog();
            // The path to the documents directory.
         

            dataDir=Path.GetFullPath(openFileDialog1.FileName);
            // Load the document from disk.
            Document doc = new Document(dataDir);

            // Save the document in PDF format.
            doc.Save(dataDir.Split(‘.’)[dataDir.Split(‘.’).Length-2] + “.pdf”);
            MessageBox.Show(“Process is success”);
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}

Ramazan CESUR