您好,今日西西来为大家解答以上的问题。实时快讯邮件合并生成多个文档怎么弄,实时快讯邮件合并生成多个文档相信很多小伙伴还不知道,现在让我们一起来看看吧!
1、你会用邮件合并吗,先打开模板,然后选择需要链接的数据库,然后自动填充,然后合并输出,生成的就是你需要的多个文档(一个文件多页),如果需要把每个页分成一个文档一个文档,需要宏命令解决。
2、如何把一个word多页文档拆分为单页或多页(宏命令)Option ExplicitSub SplitPagesAsDocuments() Dim oSrcDoc As Document, oNewDoc As Document Dim strSrcName As String, strNewName As String Dim oRange As Range Dim nIndex As Integer Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") Set oSrcDoc = ActiveDocument Set oRange = oSrcDoc.Content oRange.Collapse wdCollapseStart ***.Select For nIndex = 1 To ActiveDocument.Content.Information(wdNumberOfPagesInDocument) oSrcDoc.Bookmarks("page").Range.Copy ***.Windows(1).Activate Application.***.Target = wdBrowsePage Application.***.Next strSrcName = oSrcDoc.FullName strNewName = fso.BuildPath(fso.GetParentFolderName(strSrcName), _ fso.GetBaseName(strSrcName) & "_" & nIndex & "." & fso.GetExtensionName(strSrcName)) Set oNewDoc = Documents.Add Selection.Paste oNewDoc.SaveAs strNewName oNewDoc.Close False Next Set oNewDoc = Nothing Set oRange = Nothing Set oSrcDoc = Nothing Set fso = Nothing MsgBox "结束!"End Sub。
本文就为大家分享到这里,希望小伙伴们会喜欢。