Wordize for .NET เป็นโซลูชันระดับมืออาชีพสำหรับการรวมเอกสาร Word แบบอัตโนมัติในกระบวนการทำงานเอกสารขององค์กร คลาส Merger ช่วยให้นักพัฒนา C# สามารถรวมไฟล์ Word โดยโปรแกรมเพื่อเตรียมรายงาน สร้างเอกสาร และสนับสนุนด้านกฎหมายสำหรับธุรกรรม
ฟังก์ชันหลัก:ทดสอบความสามารถในการรวมเอกสาร Word โดยโปรแกรมโดยใช้การสาธิตออนไลน์แบบโต้ตอบที่นำเสนอในหน้านี้ อัปโหลดไฟล์ Word หลายไฟล์ ระบุพารามิเตอร์การรวม ดำเนินการ และดาวน์โหลดเอกสารที่รวมแล้วเพื่อตรวจสอบ ข้อมูลโค้ด C# ที่ให้มานั้นพร้อมสมบูรณ์สำหรับใช้งานในโปรเจค .NET ของคุณ
using Wordize.Merging;
Merger.Merge("Output.docx",
[
"Input1.docx",
"Input2.docx"
]);
using Wordize.Merging;
Merger.Merge("Output.docx",
[
"Input1.docx",
"Input2.docx"
]);
using Wordize.Merging;
using Wordize.Saving;
var imageStreams = Merger.MergeToImages(
["Input1.docx", "Input2.docx"],
new ImageSaveOptions(SaveFormat.Docx) { PageLayout = MultiPageLayout.Vertical(10) },
MergeFormatMode.KeepSourceFormatting
);
using var file = File.Create($"Output.docx");
imageStreams[0].Position = 0;
imageStreams[0].CopyTo(file);
using Wordize.Merging;
using Wordize.Saving;
ImageSaveOptions saveOptions = new ImageSaveOptions(saveFormat);
saveOptions.PageLayout = MultiPageLayout.Vertical(10);
Merger.Create()
.From("Input1.docx")
.From("Input2.docx")
.To("Output.docx", saveOptions)
.Execute();
using Wordize.Merging;
Merger.Create()
.From("Input1.docx")
.From("Input2.docx")
.To("Output.docx", SaveFormat.Docx)
.Execute();