- Code: Select all
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 WindowsFormsApplication6
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//load
Document doc = new Document();
doc.LoadFromFile(@"E:\asdaa.docx");
//save
doc.Replace("Text1", textBox1.Text, false, true);
doc.Replace("Book", textBox2.Text, false, true);
doc.SaveToFile(@"C:\Users\kchkholaria\Desktop\asdaa.docx", FileFormat.Docx);
}
}
}
Any advice would be helpful
thank you in advance.