怎样把一个word文档分割成多个文档?
比如说,一个doc文件一共有50页
想把每页都存成一个文件,文件名就是该页的头两个字
怎么做呀
谢谢了
[解决办法]
Dim i As Integer
Dim strDir As String
Dim intSum As Integer
intSum = Content.Information(wdNumberOfPagesInDocument) 'activedocument.BuiltInDocumentProperties
strDir = ActiveDocument.Path
For i = 1 To intSum
If Content.Information(wdNumberOfPagesInDocument) > 1 Then
Dim rng As Range
Dim intStart As Integer
Dim intEnd As Integer
ActiveDocument.Range(0, 1).Select
With Selection
.GoTo(what:=wdGoToPage, which:=wdGoToNext, Count:=1).Select
intEnd = .End
End With
ActiveDocument.Range(0, intEnd).Cut
Documents.Add Visible:=True
ActiveDocument.Content.Paste
End If
ActiveDocument.SaveAs ActiveDocument.Range(0, 2).Text
ActiveDocument.Close
Next