word分割成多个文件 word文件分割 - 电脑|办公 - 电脑办公-杀毒安全-网络-V3学习网
微商网
 
 
导航:首页 |电脑|办公|正文

word分割成多个文件 word文件分割

时间:2021-04-14 10:20:08
如何将一个word文档按页分割成多个word文档?Range;End Sub4、键入F5运行 Copy oSrcDoc、检查当前文档所在路径下是否生成若干名为“原始文档_n doc”(n代表其对应原始
作者:

word分割成多个文件

如何将一个word文档按页分割成多个word文档?

Range;End Sub4、键入F5运行.Copy oSrcDoc、检查当前文档所在路径下是否生成若干名为“原始文档_n.doc”(n代表其对应原始文档中的第几页)的文档.GetParentFolderName(strSrcName),看到“完成;." & fso; & nIndex & &quot.Windows(1).Activate Application.Browser.Target = wdBrowsePage Application。

5!”结束, 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 oRange.Next strSrcName = oSrcDoc.FullName strNewName = fso.BuildPath(fso!"page&quot.GetExtensionName(strSrcName)) Set oNewDoc = Documents.Add Selection.Close False Next Set oNewDoc = Nothing Set oRange = Nothing Set oSrcDoc = Nothing Set fso = Nothing MsgBox "结束.Paste oNewDoc.SaveAs strNewName oNewDoc, _ fso.GetBaseName(strSrcName) & "_&quot.Select For nIndex = 1 To ActiveDocument.Content.Information(wdNumberOfPagesInDocument) oSrcDoc.Bookmarks("\.Browser;)1、在Word里面打开那个需要分割的文档(假设它的文件名叫做“原始文档.doc”);2、键入ALT+F11打开VBA编辑器,选择菜单“插入-模块”;3、粘贴下面的代码:Option ExplicitSub SplitPagesAsDocuments() Dim oSrcDoc As Document, oNewDoc As Document Dim strSrcName As String 展开

一个word文档怎么拆分成多个文档

1、视图——大纲,切换到大纲视图,选中要拆分的标题及正文(选定的方法是鼠标移到该标题前的空心十字符号,此时鼠标指针变成十字箭头,单击鼠标即可选定该标题包括的内容)2、单击【大纲】工具栏中的【创建子文档】按钮,每个子文档会放在一个虚线框中,并且在虚线框的左上角显示一个子文档图标,子文档之间用分节符隔开。

3、把文件保存下来即可。

Word 在保存主文档的同时,会自动保存创建的子文档,并且以子文档的第一行文本作为文件名。

...

如何将一个word文档按页拆分成多个文档

1、在Word里面打开那个需要分割的文档(假设它的文件名叫做“原始文档.doc”);键入ALT+F11打开VBA编辑器,选择菜单“插入-模块”;粘贴下面的代码:Option ExplicitSub SplitPagesAsDocuments()Dim oSrcDoc As Document, oNewDoc As DocumentDim strSrcName As String, strNewName As StringDim oRange As RangeDim nIndex As IntegerDim fso As ObjectSet fso = CreateObject("Scripting.FileSystemObject")Set oSrcDoc = ActiveDocumentSet oRange = oSrcDoc.ContentoRange.Collapse wdCollapseStartoRange.SelectFor nIndex = 1 To ActiveDocument.Content.Information(wdNumberOfPagesInDocument)oSrcDoc.Bookmarks("\page").Range.CopyoSrcDoc.Windows(1).ActivateApplication.Browser.Target = wdBrowsePageApplication.Browser.NextstrSrcName = oSrcDoc.FullNamestrNewName = fso.BuildPath(fso.GetParentFolderName(strSrcName), _fso.GetBaseName(strSrcName) & "_" & nIndex & "." & fso.GetExtensionName(strSrcName))Set oNewDoc = Documents.AddSelection.PasteoNewDoc.SaveAs strNewNameoNewDoc.Close FalseNextSet oNewDoc = NothingSet oRange = NothingSet oSrcDoc = NothingSet fso = NothingMsgBox "结束!"End Sub键入F5运行,看到“完成!”结束。

2、检查当前文档所在路径下是否生成若干名为“原始文档_n.doc”(n代表其对应原始文档中的第几页)的文档,检查它们的内容是否就对应于原始文档每个页面的内容。

如文档中有分节符分解后的文档会出现空白页,如要分解后不出现空白页,需要把文档中的分节符删除。

消除分节符的方法:注意事项分节符若全部替换,要注意替换后文档可能会出现排版混乱,这则需要自己手动排版了。

如何将一个word文档分割成多个word文档

1、打开需要拆分的文档2、将需要拆分的章节标题样式选中“标题1”3、选择大纲视图——显示1级标题——点击显示文档4、双击第一章前面的“+”号以显示第一章全部内容,点击创建,将第一章进行拆分5、双击图中所示文本标志。

6、会自动弹出新word窗口,新word文档为全部第一章节内容,点击保存即可。

然后重复上面步骤,将其他章节进行拆分。

怎么把一个word文档分成多个

打开要处理的WORD文档,然后ALT+F8调出宏处理窗口,新输入宏名称为MyPg。

点击右侧的编辑按钮,输入如下内容,完成后键盘F5即可。

但完成后最后2个文件也会会有问题,手动修改一下就行了。

Sub MyPg()Dim oWord As Word.ApplicationDim oDoc As Word.DocumentDim oNewDoc As Word.DocumentDim oRange As Word.RangeDim lCurrentStart As LongDim lCurrentEnd As LongDim lDocumentEnd As LongDim lOutputCount As LonglOutputCount = 0Set oWord = GetObject(, "Word.Application")Set oDoc = ActiveDocumentoDoc.SelectlCurrentStart = oWord.Selection.StartlCurrentEnd = lCurrentStartlDocumentEnd = oWord.Selection.EndoWord.Selection.Collapse wdCollapseStartDo While (lCurrentEnd oWord.Browser.Target = wdBrowsePageoWord.Browser.NextoWord.Browser.NextoWord.Browser.NextoWord.Browser.NextlCurrentEnd = oWord.Selection.EndIf (lCurrentStart = lCurrentEnd) ThenlCurrentEnd = lDocumentEndEnd IfSet oRange = oDoc.Range(lCurrentStart, lCurrentEnd)Set oNewDoc = oWord.Documents.AddoRange.CopyoNewDoc.Range(0, 0).PastelOutputCount = lOutputCount + 1oNewDoc.SaveAs FileName:="d:\" & lOutputCount & ".doc"oNewDoc.CloselCurrentStart = lCurrentEndLoopEnd Sub

word拆分多个新文件

1、在Word里面打开那个需要分割的文档(假设它的文件名叫做“原始文档.doc”);键入ALT+F11打开VBA编辑器,选择菜单“插入-模块”;粘贴下面的代码:Option ExplicitSub SplitPagesAsDocuments()Dim oSrcDoc As Document, oNewDoc As DocumentDim 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 oRange.Select For nIndex = 1 To ActiveDocument.Content.Information(wdNumberOfPagesInDocument) oSrcDoc.Bookmarks("\page").Range.Copy oSrcDoc.Windows(1).Activate Application.Browser.Target = wdBrowsePage Application.Browser.Next strSrcName = oSrcDoc.FullName strNewName = fso.BuildPath(fso.GetParentFolderName(strSrcName), _ fso.GetBaseName(strSrcName) & "_" & nIndex & "." & fso.GetExtensionName(strSrcName)) Set oNewDoc = Documents.Add Select...

大家还关注
阅读排行
推荐阅读