//批量多个word文件合并成一个word文件
public void uniteDoc(ArrayList fileList, String savepaths,ArrayList filenameList) {
if (fileList.size() == 0 || fileList == null) {
return;
}
//打开word
ActiveXComponent app = new ActiveXComponent("Word.Application");//启动word
try {
// 设置word不可见
app.setProperty("Visible", new Variant(false));
//获得documents对象
public void uniteDoc(ArrayList fileList, String savepaths,ArrayList filenameList) {
if (fileList.size() == 0 || fileList == null) {
return;
}
//打开word
ActiveXComponent app = new ActiveXComponent("Word.Application");//启动word
try {
// 设置word不可见
app.setProperty("Visible", new Variant(false));
//获得documents对象

本文介绍了如何利用Jacob库在Java中实现选择多个Word文档进行合并,并在合适位置插入分页符的功能,以达到文档整理的目的。
最低0.47元/天 解锁文章
340

被折叠的 条评论
为什么被折叠?



