🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Ramazan HABER / C# RMOS / word to text word den stringe çevirme word reader doc docx

 1-) C# RMOS - word to text word den stringe çevirme word reader doc docx

 

1-) C# RMOS - Gerekli .dll yüklenmesi için Ekrana bir tane Devexpress'in RichEditControl at

2-) KOD

using DevExpress.XtraRichEdit;

using System;

using System.Windows.Forms;

 

namespace WindowsFormsApplication3

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        private void Form1_Load(object sender, EventArgs e)

        {

            string path1 = @"C:\Users\Ramazan\Desktop\rar2.docx";

            string deger = ExtractTextFromWord(path1);

        }

        public string ExtractTextFromWord(string filePath)

        {

            string documentText = "";

            try

            {

                using (RichEditControl documentProcessor = new RichEditControl())

                {

                    documentProcessor.LoadDocument(filePath);

                    documentText = documentProcessor.Text;

                }

            }

            catch { }

            return documentText;

        }

    }

}

 

 2021 Ocak 18 Pazartesi
 522