Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using Spire.Doc;
- namespace WindowsFormsApp6
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- string text = "";
- Document document = new Document();
- document.LoadFromFile(@"C:\Users\pavle\Desktop\LoremIpsum.docx");
- foreach (Section section in document.Sections)
- {
- for (int i = 0; i < section.Paragraphs.Count; i++)
- {
- text += section.Paragraphs[i].Text;
- }
- }
- textBox1.Text = text;
- }
- }
- }
Add Comment
Please, Sign In to add comment