KINLONG
  • Home
  • Profiles ▼
  • Communities ▼
  • Apps ▼
  • Metrics
  • Moderation
首页
  • ▼
  • Log In
  • Share
  • ?
  • IBMIBM

Communities

This community can have members from outside your organization. 品质管理部

  • Log in to participate
e8e555d4-8e70-488c-9349-9ea2f2dc5971 Blog

▼ Tags

 

▼ Archive

  • March 2020
  • October 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018

▼ Blog Authors

品质管理

View All Entries
Clicking the button causes a full page refresh. The user could go to the "Entry list" region to view the new content.) Entry list

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

闵雄 005b0ec0-bb88-1037-9e8b-ab4bc38c0954 | ‎ | 1 Comment ‎ | 90 Views

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

 

  1. 键入ALT+F11打开VBA编辑器,选择菜单“插入-模块”
  2. 粘贴下面的代码

    Option Explicit
    Sub 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
        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
            Selection.Paste
            oNewDoc.SaveAs strNewName
            oNewDoc.Close False
        Next
        Set oNewDoc = Nothing
        Set oRange = Nothing
        Set oSrcDoc = Nothing
        Set fso = Nothing
        MsgBox "
    结束!"
    End Sub

  3. 键入F5,点击运行,看到“完成!”结束
  • Add a Comment Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry
Notify Other People
notification_ex

Send Email Notification

Quarantine this entry

deleteEntry
duplicateEntry

Mark as Duplicate

  • Previous Entry
  • Main
  • Next Entry
Feed for Blog Entries | Feed for Blog Comments | Feed for Comments for this Entry
  • Home
  • Help
  • IBM Support Forums
  • Bookmarking Tools
  • Server Metrics
  • Mobile UI
  • About
  • IBM Connections on ibm.com
  • Submit Feedback