第1个回答 2008-10-19
代码如下。VB的。不需要什么控件,直接复制代码运行即可。我默认文件d:\a.doc,保存在d:\1.doc,d:\2.doc(有几页就有几个文件)....中。
==========
Private Sub Form_Load()
Dim w As Object, d As Object, s As Object, page As Object, i As Integer
Set w = CreateObject("WORD.application")
w.Visible = True
Set d = w.Documents.Open("d:\a.doc")
For Each page In d.ActiveWindow.ActivePane.Pages
i = i + 1
Set s = w.Documents.Add
s.Content = page.Rectangles.Item(1).Range
s.SaveAs "d:\" & i & ".doc"
Next
Set w = Nothing
Set d = Nothing
Set s = Nothing
MsgBox "完毕"
End
End Sub