如何把一个word大文件拆分几个小文件

发布网友 发布时间:2022-04-22 09:24

我来回答

2个回答

热心网友 时间:2023-10-25 08:48

以WPS 2019版本为例:

如需将一个word大文件拆分几个小文件,可使用WPS2019中已自带的「文档拆分」功能:

操作步骤:

1)打开其中一份「文字(Word」文档;

2)点击「特色应用-拆分合并-拆分」; 

3)点击添加需合并文件,设置合并文件需合并的页数范围即可将多个文档合并为一份。

热心网友 时间:2023-10-25 08:49

把一个word文档拆分为多个小文档的方法:
1.打开要处理的WORD文档,然后ALT+F8调出宏处理窗口,新输入宏名称为MyPg。
2.点击右侧的编辑按钮,输入如下内容,完成后键盘F5即可。
3.粘贴如下内容
Option Explicit
Sub MyPg()
Dim oSrcDoc As Document, oNewDoc As Document
Dim strSrcName As String, strNewName As String
Dim oRange As Range
Dim nIndex As Integer, nSubIndex As Integer, nTotalPages As Integer, nBound As Integer
Dim fso As Object
Const nSteps = 200 ' 修改这里控制每隔几页分割一次
Set fso = CreateObject("Scripting.FileSystemObject")
Set oSrcDoc = ActiveDocument
Set oRange = oSrcDoc.Content
nTotalPages = ActiveDocument.Content.Information(wdNumberOfPagesInDocument)
oRange.Collapse wdCollapseStart
oRange.Select
For nIndex = 1 To nTotalPages Step nSteps
Set oNewDoc = Documents.Add
If nIndex + nSteps > nTotalPages Then
nBound = nTotalPages
Else
nBound = nIndex + nSteps - 1
End If
For nSubIndex = nIndex To nBound
oSrcDoc.Activate
oSrcDoc.Bookmarks("\page").Range.Copy
oSrcDoc.Windows(1).Activate
Application.Browser.Target = wdBrowsePage
Application.Browser.Next
oNewDoc.Activate
oNewDoc.Windows(1).Selection.Paste
Next nSubIndex
strSrcName = oSrcDoc.FullName
strNewName = fso.BuildPath(fso.GetParentFolderName(strSrcName), _
fso.GetBaseName(strSrcName) & "_" & (nIndex \ nSteps + 1) & "." & fso.GetExtensionName(strSrcName))
oNewDoc.SaveAs strNewName
oNewDoc.Close False
Next nIndex
Set oNewDoc = Nothing
Set oRange = Nothing
Set oSrcDoc = Nothing
Set fso = Nothing
MsgBox "结束!"
End Sub

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com