[请问]如何按照分节符将一个文档另存为多个文档
时间:2007-11-18
来源:互联网

[此贴子已经被作者于2007-11-18 13:13:50编辑过]
作者: wdwc 发布时间: 2007-11-18
在大纲模式下,将节适当处理一下,创建子文档,保存即得。
作者: c81 发布时间: 2007-11-18
果然,谢谢!
问题已解决。
能不能用宏实现?以(分节符-下一页)为单位?
作者: wdwc 发布时间: 2007-11-18
果然,谢谢!
问题已解决。
能不能用宏实现?以(分节符-下一页)为单位?
Dim mySec As Section, i As Long, myDoc As Document, SourceDoc As Document
Set SourceDoc = ActiveDocument
For Each mySec In SourceDoc.Sections
If mySec.PageSetup.SectionStart = wdSectionNewPage And mySec.Index > 1 Then
Set myDoc = Application.Documents.Add
myDoc.Content.FormattedText = SourceDoc.Range(i, mySec.Range.Start - 1)
myDoc.Content.Sections.Last.PageSetup.SectionStart = _
SourceDoc.Range(i, mySec.Range.Start - 1).Sections.Last.PageSetup.SectionStart
i = mySec.Range.Start
End If
If mySec.Index = SourceDoc.Sections.Count Then
Set myDoc = Application.Documents.Add
myDoc.Content.FormattedText = SourceDoc.Range(i, SourceDoc.Content.End)
myDoc.Content.Sections.Last.PageSetup.SectionStart = _
SourceDoc.Range(i, SourceDoc.Content.End).Sections.Last.PageSetup.SectionStart
End If
Next
End Sub
作者: chylhr 发布时间: 2007-11-26
谢谢chylhr
作者: wdwc 发布时间: 2007-11-28
作者: lion1982921 发布时间: 2007-12-01
作者: wslh 发布时间: 2010-05-07
引用:
原帖由 chylhr 于 2007-11-26 18:10 发表QUOTE:以下是引用wdwc在2007-11-18 22:27:55的发言:果然,谢谢!问题已解决。能不能用宏实现?以(分节符-下一页)为单位?Sub test() Dim mySec As Section, i As Long, myDoc As Document, SourceDoc ...
怎样自动保存?自动命名?
作者: szqhb 发布时间: 2011-03-26
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28