楼层: 1
这个必须用VBA来实现了,在此文档的ThisDocument的代码页中输入以下代码,然后执行Sub SaveParagraph() 即可
Option Explicit
Sub SaveParagraph()
Dim i As Integer, PageNo As Integer
Dim aDoc As Document
Dim myDoc As Document
Dim sPage As String
Set myDoc = ThisDocument
'文 档 视 图 设 定 为 页 面 方 式
ActiveWindow.View.Type = wdPageView
myDoc.Repaginate
'获 得 文 档 页 数 并 赋 值 给 变 量 PageNo
PageNo = myDoc.BuiltInDocumentProperties(wdPropertyPages)
For i = 1 To PageNo
myDoc.Activate
' 光 标 移 动 到 文 档 某一 页 的 开 始
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=i
' 全 选 文 档某一 页 的 所 有 内 容
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
sPage = Selection.Text
'保存到一个文件中
Set aDoc = Documents.Add
aDoc.Content.Text = sPage
aDoc.SaveAs FileName:="c:\" & CInt(i) & ".doc"
aDoc.Close
Next
End Sub
0
0
点击左边的图片给他一个评价吧